plugins/SpecialUserFuncs.php
changeset 324 16d0c9f33466
parent 322 5f1cd51bf1be
parent 321 c0d855cfaf0e
child 326 ab66d6d1f1f4
child 448 f725a16e4a20
equal deleted inserted replaced
323:a82133ce2d76 324:16d0c9f33466
   104   $pubkey = $session->rijndael_genkey();
   104   $pubkey = $session->rijndael_genkey();
   105   $challenge = $session->dss_rand();
   105   $challenge = $session->dss_rand();
   106   
   106   
   107   if ( isset($_GET['act']) && $_GET['act'] == 'getkey' )
   107   if ( isset($_GET['act']) && $_GET['act'] == 'getkey' )
   108   {
   108   {
       
   109     header('Content-type: application/json');
   109     $username = ( $session->user_logged_in ) ? $session->username : false;
   110     $username = ( $session->user_logged_in ) ? $session->username : false;
   110     $response = Array(
   111     $response = Array(
   111       'username' => $username,
   112       'username' => $username,
   112       'key' => $pubkey,
   113       'key' => $pubkey,
   113       'challenge' => $challenge
   114       'challenge' => $challenge