X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=includes%2Fapi%2FApiAMCreateAccount.php;h=2511e3be99cbacc39460db754d4e73b952f19828;hb=d115a799235833e59f75958b9fdf011a19f0061b;hp=52a79513b4a16aabd8e842ddefc7c0bfe458146a;hpb=cf8b6e8b21713eebfac96dfbf2f3ccb88c8032e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiAMCreateAccount.php b/includes/api/ApiAMCreateAccount.php index 52a79513b4..2511e3be99 100644 --- a/includes/api/ApiAMCreateAccount.php +++ b/includes/api/ApiAMCreateAccount.php @@ -66,13 +66,15 @@ class ApiAMCreateAccount extends ApiBase { $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; } @@ -93,6 +95,7 @@ class ApiAMCreateAccount extends ApiBase { $this->getResult()->addValue( null, 'createaccount', $helper->formatAuthenticationResponse( $res ) ); + $helper->logAuthenticationResult( 'accountcreation', $res ); } public function isReadMode() {