Merge "Support all values for exif PhotometricInterpretation"
[lhc/web/wiklou.git] / includes / api / ApiCreateAccount.php
index b3a543a..1368bda 100644 (file)
@@ -21,6 +21,7 @@
  *
  * @file
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Unit to authenticate account registration attempts to the current wiki.
@@ -94,7 +95,11 @@ class ApiCreateAccount extends ApiBase {
                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!
@@ -113,7 +118,9 @@ class ApiCreateAccount extends ApiBase {
                                        '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() );
                        }