Merge "Added jobqueue.pickup_root_age metric"
[lhc/web/wiklou.git] / includes / api / ApiCreateAccount.php
index b3a543a..5443fac 100644 (file)
@@ -21,6 +21,7 @@
  *
  * @file
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Unit to authenticate account registration attempts to the current wiki.
@@ -95,6 +96,10 @@ class ApiCreateAccount extends ApiBase {
                $loginForm->load();
 
                $status = $loginForm->addNewaccountInternal();
+               LoggerFactory::getInstance( 'authmanager' )->info( 'Account creation attempt via API', array(
+                       'event' => 'accountcreation',
+                       'status' => $status,
+               ) );
                $result = array();
                if ( $status->isGood() ) {
                        // Success!