3193 } |
3193 } |
3194 |
3194 |
3195 $username =& $userinfo['username']; |
3195 $username =& $userinfo['username']; |
3196 $password =& $userinfo['password']; |
3196 $password =& $userinfo['password']; |
3197 |
3197 |
|
3198 // If we're logging in with a temp password, attach to the login_password_reset hook to send our JSON response |
|
3199 // A bit hackish since it just dies with the response :-( |
|
3200 $plugins->attachHook('login_password_reset', '$this->process_login_request(array(\'mode\' => \'respond_password_reset\', \'user_id\' => $row[\'user_id\'], \'temp_password\' => $row[\'temp_password\']));'); |
|
3201 |
3198 // attempt the login |
3202 // attempt the login |
3199 // function login_without_crypto($username, $password, $already_md5ed = false, $level = USER_LEVEL_MEMBER, $captcha_hash = false, $captcha_code = false) |
3203 // function login_without_crypto($username, $password, $already_md5ed = false, $level = USER_LEVEL_MEMBER, $captcha_hash = false, $captcha_code = false) |
3200 $login_result = $this->login_without_crypto($username, $password, false, intval($req['level']), @$req['captcha_hash'], @$req['captcha_code']); |
3204 $login_result = $this->login_without_crypto($username, $password, false, intval($req['level']), @$req['captcha_hash'], @$req['captcha_code']); |
3201 |
3205 |
3202 if ( $login_result['success'] ) |
3206 if ( $login_result['success'] ) |
3217 } |
3221 } |
3218 |
3222 |
3219 break; |
3223 break; |
3220 case 'clean_key': |
3224 case 'clean_key': |
3221 // Clean out a key, since it won't be used. |
3225 // Clean out a key, since it won't be used. |
|
3226 // This is called when the user clicks Cancel in the AJAX login interface. |
3222 if ( !empty($req['key_aes']) ) |
3227 if ( !empty($req['key_aes']) ) |
3223 { |
3228 { |
3224 $this->fetch_public_key($req['key_aes']); |
3229 $this->fetch_public_key($req['key_aes']); |
3225 } |
3230 } |
3226 if ( !empty($req['key_dh']) ) |
3231 if ( !empty($req['key_dh']) ) |