plugins/SpecialUserFuncs.php
changeset 60 71b50f8c8f85
parent 57 b354deeaa4c4
child 81 d7fc25acd3f3
equal deleted inserted replaced
59:7c4a851fb5c5 60:71b50f8c8f85
    97   $pubkey = $session->rijndael_genkey();
    97   $pubkey = $session->rijndael_genkey();
    98   $challenge = $session->dss_rand();
    98   $challenge = $session->dss_rand();
    99   
    99   
   100   if ( isset($_GET['act']) && $_GET['act'] == 'getkey' )
   100   if ( isset($_GET['act']) && $_GET['act'] == 'getkey' )
   101   {
   101   {
       
   102     $username = ( $session->user_logged_in ) ? $session->username : false;
   102     $response = Array(
   103     $response = Array(
       
   104       'username' => $username,
   103       'key' => $pubkey,
   105       'key' => $pubkey,
   104       'challenge' => $challenge
   106       'challenge' => $challenge
   105       );
   107       );
   106     $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
   108     $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
   107     $response = $json->encode($response);
   109     $response = $json->encode($response);