X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fauth%2FResetPasswordSecondaryAuthenticationProvider.php;h=45ac3aa0b5a95320c01133cc3c035a234db64f7b;hb=b6e8e6b83267e1357bb04edb7976f1a11ee10a5b;hp=dd97830dae9355a6af3fad9688d4e71449a0f350;hpb=500889f19005b4aed93c5b6eaafd35689fce7dcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php index dd97830dae..45ac3aa0b5 100644 --- a/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php +++ b/includes/auth/ResetPasswordSecondaryAuthenticationProvider.php @@ -58,6 +58,7 @@ class ResetPasswordSecondaryAuthenticationProvider extends AbstractSecondaryAuth /** * Try to reset the password + * @param \User $user * @param AuthenticationRequest[] $reqs * @return AuthenticationResponse */ @@ -112,17 +113,17 @@ class ResetPasswordSecondaryAuthenticationProvider extends AbstractSecondaryAuth $req = AuthenticationRequest::getRequestByClass( $reqs, get_class( $needReq ) ); if ( !$req || !array_key_exists( 'retype', $req->getFieldInfo() ) ) { - return AuthenticationResponse::newUI( $needReqs, $data->msg ); + return AuthenticationResponse::newUI( $needReqs, $data->msg, 'warning' ); } if ( $req->password !== $req->retype ) { - return AuthenticationResponse::newUI( $needReqs, new \Message( 'badretype' ) ); + return AuthenticationResponse::newUI( $needReqs, new \Message( 'badretype' ), 'error' ); } $req->username = $user->getName(); $status = $this->manager->allowsAuthenticationDataChange( $req ); if ( !$status->isGood() ) { - return AuthenticationResponse::newUI( $needReqs, $status->getMessage() ); + return AuthenticationResponse::newUI( $needReqs, $status->getMessage(), 'error' ); } $this->manager->changeAuthenticationData( $req );