plugins/SpecialUserFuncs.php
changeset 229 b2f985e4cef3
parent 217 5bcdee999015
child 235 b3cfaf0a505c
equal deleted inserted replaced
228:7846d45bd250 229:b2f985e4cef3
   374         // and yet the password got encrypted, that means the user screwed with the code, and if the user screwed with the code and thus
   374         // and yet the password got encrypted, that means the user screwed with the code, and if the user screwed with the code and thus
   375         // forgot his password, that's his problem.
   375         // forgot his password, that's his problem.
   376         
   376         
   377         if ( $_POST['use_crypt'] == 'yes' )
   377         if ( $_POST['use_crypt'] == 'yes' )
   378         {
   378         {
   379           $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
   379           $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
   380           $crypt_key = $session->fetch_public_key($_POST['crypt_key']);
   380           $crypt_key = $session->fetch_public_key($_POST['crypt_key']);
   381           if ( !$crypt_key )
   381           if ( !$crypt_key )
   382           {
   382           {
   383             $s = 'Couldn\'t look up public encryption key';
   383             $s = 'Couldn\'t look up public encryption key';
   384           }
   384           }
  1065       return false;
  1065       return false;
  1066     }
  1066     }
  1067     
  1067     
  1068     if ( isset($_POST['do_stage2']) )
  1068     if ( isset($_POST['do_stage2']) )
  1069     {
  1069     {
  1070       $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE);
  1070       $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
  1071       if($_POST['use_crypt'] == 'yes')
  1071       if($_POST['use_crypt'] == 'yes')
  1072       {
  1072       {
  1073         $crypt_key = $session->fetch_public_key($_POST['crypt_key']);
  1073         $crypt_key = $session->fetch_public_key($_POST['crypt_key']);
  1074         if(!$crypt_key)
  1074         if(!$crypt_key)
  1075         {
  1075         {