47 return $this->
tryReset( $user, $reqs );
51 return $this->
tryReset( $user, $reqs );
55 return $this->
tryReset( $user, $reqs );
59 return $this->
tryReset( $user, $reqs );
69 $data = $this->manager->getAuthenticationSessionData(
'reset-pass' );
74 if ( is_array( $data ) ) {
75 $data = (object)$data;
77 if ( !is_object( $data ) ) {
78 throw new \UnexpectedValueException(
'reset-pass is not valid' );
81 if ( !isset( $data->msg ) ) {
82 throw new \UnexpectedValueException(
'reset-pass msg is missing' );
83 } elseif ( !$data->msg instanceof
Message ) {
84 throw new \UnexpectedValueException(
'reset-pass msg is not valid' );
85 } elseif ( !isset( $data->hard ) ) {
86 throw new \UnexpectedValueException(
'reset-pass hard is missing' );
87 } elseif ( isset( $data->req ) && (
89 !array_key_exists(
'retype', $data->req->getFieldInfo() )
91 throw new \UnexpectedValueException(
'reset-pass req is not valid' );
97 $this->manager->removeAuthenticationSessionData(
'reset-pass' );
104 '@phan-var PasswordAuthenticationRequest $needReq';
105 if ( !$needReq->action ) {
110 $needReqs = [ $needReq ];
111 if ( !$data->hard ) {
114 wfMessage(
'authprovider-resetpass-skip-label' ),
115 wfMessage(
'authprovider-resetpass-skip-help' )
121 '@phan-var PasswordAuthenticationRequest $req';
122 if ( !$req || !array_key_exists(
'retype', $req->getFieldInfo() ) ) {
126 if ( $req->password !== $req->retype ) {
130 $req->username = $user->
getName();
131 $status = $this->manager->allowsAuthenticationDataChange( $req );
132 if ( !$status->isGood() ) {
135 $this->manager->changeAuthenticationData( $req );
137 $this->manager->removeAuthenticationSessionData(
'reset-pass' );
wfMessage( $key,... $params)
This is the function for getting translated interface messages.