*
* @file
*/
+use MediaWiki\Logger\LoggerFactory;
/**
* Unit to authenticate account registration attempts to the current wiki.
Hooks::run( 'AddNewAccountApiForm', array( $this, $loginForm ) );
$loginForm->load();
- $status = $loginForm->addNewaccountInternal();
+ $status = $loginForm->addNewAccountInternal();
+ LoggerFactory::getInstance( 'authmanager' )->info( 'Account creation attempt via API', array(
+ 'event' => 'accountcreation',
+ 'status' => $status,
+ ) );
$result = array();
if ( $status->isGood() ) {
// Success!
'createaccount-title',
'createaccount-text'
) );
- } elseif ( $this->getConfig()->get( 'EmailAuthentication' ) && Sanitizer::validateEmail( $user->getEmail() ) ) {
+ } elseif ( $this->getConfig()->get( 'EmailAuthentication' ) &&
+ Sanitizer::validateEmail( $user->getEmail() )
+ ) {
// Send out an email authentication message if needed
$status->merge( $user->sendConfirmationMail() );
}