$user = $this->getUser();
if ( !$request->wasPosted() && !$user->isLoggedIn() ) {
$this->error( $this->msg( 'resetpass-no-info' )->text() );
+
return;
}
if ( $request->wasPosted() && $request->getBool( 'wpCancel' ) ) {
$this->doReturnTo();
+
return;
}
$this->mDomain = $wgAuth->getDomain();
if ( !$wgAuth->allowPasswordChange() ) {
$this->error( $this->msg( 'resetpass_forbidden' )->text() );
+
return;
}
$login->setContext( $this->getContext() );
$login->execute( null );
}
+
return;
} catch ( PasswordError $e ) {
$this->error( $e->getMessage() );
$out .= "</td>\n";
$out .= "</tr>";
}
+
return $out;
}
throw new PasswordError( $this->msg( 'login-throttled' )->text() );
}
+ $abortMsg = 'resetpass-abort-generic';
+ if ( !wfRunHooks( 'AbortChangePassword', array( $user, $this->mOldpass, $newpass, &$abortMsg ) ) ) {
+ wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'abortreset' ) );
+ throw new PasswordError( $this->msg( $abortMsg )->text() );
+ }
+
if ( !$user->checkTemporaryPassword( $this->mOldpass ) && !$user->checkPassword( $this->mOldpass ) ) {
wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'wrongpassword' ) );
throw new PasswordError( $this->msg( 'resetpass-wrong-oldpass' )->text() );