X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fauth%2FResetPasswordSecondaryAuthenticationProvider.php;h=45ac3aa0b5a95320c01133cc3c035a234db64f7b;hb=ce079cf6ad79ca8d3360817f809b219d166f9153;hp=dd97830dae9355a6af3fad9688d4e71449a0f350;hpb=5f0cc1436acfbe92775c035121b9c61db9d6092d;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 );