$allowPasswordChange = $wgDisableAuthManager ? $wgAuth->allowPasswordChange()
: AuthManager::singleton()->allowsAuthenticationDataChange(
- new PasswordAuthenticationRequest(), false );
+ new PasswordAuthenticationRequest(), false )->isGood();
if ( $canEditPrivateInfo && $allowPasswordChange ) {
$link = Linker::link( SpecialPage::getTitleFor( 'ChangePassword' ),
$context->msg( 'prefs-resetpass' )->escaped(), [],
$reqs = AuthenticationRequest::loadRequestsFromSubmission( $reqs, $data );
foreach ( $reqs as $req ) {
$status = AuthManager::singleton()->allowsAuthenticationDataChange( $req );
- if ( !$status->isOk() ) {
+ if ( !$status->isGood() ) {
$this->logger->info( __METHOD__ . ': Password change rejected: {reason}', [
'username' => $data['username'],
'reason' => $status->getWikiText( null, null, 'en' ),
$req = reset( $requests );
$status = $authManager->allowsAuthenticationDataChange( $req );
Hooks::run( 'ChangeAuthenticationDataAudit', [ $req, $status ] );
- if ( !$status->isOK() ) {
+ if ( !$status->isGood() ) {
return AuthenticationResponse::newFail( $status->getMessage() );
}
$authManager->changeAuthenticationData( $req );
$reqs = AuthenticationRequest::loadRequestsFromSubmission( $reqs, $data );
foreach ( $reqs as $req ) {
$status = $manager->allowsAuthenticationDataChange( $req );
- if ( !$status->isOk() ) {
+ if ( !$status->isGood() ) {
\MediaWiki\Logger\LoggerFactory::getInstance( 'authentication' )
->info( __METHOD__ . ': Password change rejected: ' . $status->getWikiText() );
return false;