*/
use MediaWiki\Auth\AuthManager;
-use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Auth\AuthenticationResponse;
/**
$helper = new ApiAuthManagerHelper( $this );
$manager = AuthManager::singleton();
- // Make sure it's possible to log in
+ // Make sure it's possible to create accounts
if ( !$manager->canCreateAccounts() ) {
$this->getResult()->addValue( null, 'createaccount', $helper->formatAuthenticationResponse(
AuthenticationResponse::newFail(
$this->msg( 'userlogin-cannot-' . AuthManager::ACTION_CREATE )
)
) );
+ $helper->logAuthenticationResult( 'accountcreation',
+ 'userlogin-cannot-' . AuthManager::ACTION_CREATE );
return;
}
$this->getResult()->addValue( null, 'createaccount',
$helper->formatAuthenticationResponse( $res ) );
+ $helper->logAuthenticationResult( 'accountcreation', $res );
}
public function isReadMode() {