equal
deleted
inserted
replaced
66 $errors[] = 'The username you entered contains invalid characters.'; |
66 $errors[] = 'The username you entered contains invalid characters.'; |
67 |
67 |
68 $password = false; |
68 $password = false; |
69 if ( $_POST['changing_pw'] == 'yes' ) |
69 if ( $_POST['changing_pw'] == 'yes' ) |
70 { |
70 { |
71 $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); |
71 $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE); |
72 $key_hex_md5 = $_POST['crypt_key']; |
72 $key_hex_md5 = $_POST['crypt_key']; |
73 $key_hex = $session->fetch_public_key($key_hex_md5); |
73 $key_hex = $session->fetch_public_key($key_hex_md5); |
74 if ( $key_hex ) |
74 if ( $key_hex ) |
75 { |
75 { |
76 $key_bin = hexdecode($key_hex); |
76 $key_bin = hexdecode($key_hex); |
346 echo '<div class="error-box">Sorry Charlie, no can do. You might mess up other people logged into the demo site.</div>'; |
346 echo '<div class="error-box">Sorry Charlie, no can do. You might mess up other people logged into the demo site.</div>'; |
347 } |
347 } |
348 else |
348 else |
349 { |
349 { |
350 // Get the current session information so the user doesn't get logged out |
350 // Get the current session information so the user doesn't get logged out |
351 $aes = new AESCrypt(AES_BITS, AES_BLOCKSIZE); |
351 $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE); |
352 $sk = md5(strrev($session->sid_super)); |
352 $sk = md5(strrev($session->sid_super)); |
353 $qb = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.$sk.'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_ADMIN); |
353 $qb = $db->sql_query('SELECT session_key,salt,auth_level,source_ip,time FROM '.table_prefix.'session_keys WHERE session_key=\''.$sk.'\' AND user_id='.$session->user_id.' AND auth_level='.USER_LEVEL_ADMIN); |
354 if ( !$qb ) |
354 if ( !$qb ) |
355 { |
355 { |
356 die('Error selecting session key info block B: '.$db->get_error()); |
356 die('Error selecting session key info block B: '.$db->get_error()); |
542 |
542 |
543 /** |
543 /** |
544 * Constructor. |
544 * Constructor. |
545 */ |
545 */ |
546 |
546 |
547 function __construct() |
547 function Admin_UserManager_SmartForm() |
548 { |
548 { |
549 $this->uuid = md5( mt_rand() . microtime() ); |
549 $this->uuid = md5( mt_rand() . microtime() ); |
550 } |
|
551 |
|
552 /** |
|
553 * PHP4 constructor. |
|
554 */ |
|
555 |
|
556 function Admin_UserManager_SmartForm() |
|
557 { |
|
558 $this->__construct(); |
|
559 } |
550 } |
560 |
551 |
561 /** |
552 /** |
562 * Renders and returns the finished form. |
553 * Renders and returns the finished form. |
563 * @return string |
554 * @return string |