equal
deleted
inserted
replaced
4021 } |
4021 } |
4022 else if ( is_array($result) ) |
4022 else if ( is_array($result) ) |
4023 { |
4023 { |
4024 if ( isset($result['mode']) && $result['mode'] === 'error' && isset($result['error']) ) |
4024 if ( isset($result['mode']) && $result['mode'] === 'error' && isset($result['error']) ) |
4025 { |
4025 { |
4026 return array( |
4026 // Pass back any additional information from the error response |
|
4027 $append = $result; |
|
4028 unset($append['mode'], $append['error']); |
|
4029 |
|
4030 $return = array( |
4027 'mode' => 'login_failure', |
4031 'mode' => 'login_failure', |
4028 'error_code' => $result['error'], |
4032 'error_code' => $result['error'], |
4029 // Use this to provide a way to respawn the login box |
4033 // Use this to provide a way to respawn the login box |
4030 'respawn_info' => $this->process_login_request(array('mode' => 'getkey')) |
4034 'respawn_info' => $this->process_login_request(array('mode' => 'getkey')) |
4031 ); |
4035 ); |
|
4036 |
|
4037 $return = array_merge($append, $return); |
|
4038 return $return; |
4032 } |
4039 } |
4033 } |
4040 } |
4034 } |
4041 } |
4035 |
4042 |
4036 // If we're logging in with a temp password, attach to the login_password_reset hook to send our JSON response |
4043 // If we're logging in with a temp password, attach to the login_password_reset hook to send our JSON response |