jenkins-bot has submitted this change and it was merged.

Change subject: Move AddNewAccount out.  It is intended for Extension:Campaigns.
......................................................................


Move AddNewAccount out.  It is intended for Extension:Campaigns.

Change-Id: Ic6e8f24e6d758309d201dc95c16016e823943a5a
---
M EventLogging.hooks.php
M EventLogging.php
2 files changed, 0 insertions(+), 43 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/EventLogging.hooks.php b/EventLogging.hooks.php
index 95fe130..d9bf88c 100644
--- a/EventLogging.hooks.php
+++ b/EventLogging.hooks.php
@@ -36,48 +36,6 @@
        }
 
        /**
-        * @param User $user The User object that was created.
-        * @param boolean $byEmail The form has a [By e-mail] button.
-        * @return bool True
-        */
-       public static function onAddNewAccount( $user, $byEmail ) {
-               global $wgRequest, $wgUser;
-
-               $userId = $user->getId();
-               $creatorUserId = $wgUser->getId();
-
-               // MediaWiki allows existing users to create accounts on behalf
-               // of others. In such cases the ID of the newly-created user and
-               // the ID of the user making this web request are different.
-               $isSelfMade = ( $userId && $userId === $creatorUserId );
-
-               $displayMobile = class_exists( 'MobileContext' ) &&
-                       MobileContext::singleton()->shouldDisplayMobileView();
-
-               $event = array(
-                       'token' => $wgRequest->getCookie( 'mediaWiki.user.id', 
'', '' ),
-                       'userId' => $userId,
-                       'userName' => $user->getName(),
-                       'isSelfMade' => $isSelfMade,
-                       'userBuckets' => $wgRequest->getCookie( 'userbuckets', 
'', '' ),
-                       'displayMobile' => $displayMobile,
-               );
-
-               $returnTo = $wgRequest->getVal( 'returnto' );
-               if ( $returnTo !== null ) {
-                       $event[ 'returnTo' ] = $returnTo;
-               }
-
-               $returnToQuery = $wgRequest->getVal( 'returntoquery' );
-               if ( $returnToQuery !== null ) {
-                       $event[ 'returnToQuery' ] = $returnToQuery;
-               }
-
-               efLogServerSideEvent( 'ServerSideAccountCreation', 5233795, 
$event );
-               return true;
-       }
-
-       /**
         * Log server-side event on successful page edit.
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
         * @see https://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete
diff --git a/EventLogging.php b/EventLogging.php
index f269a02..f80c086 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -242,7 +242,6 @@
 
 $wgExtensionFunctions[] = 'EventLoggingHooks::onSetup';
 
-$wgHooks[ 'AddNewAccount' ][] = 'EventLoggingHooks::onAddNewAccount';
 $wgHooks[ 'PageContentSaveComplete' ][] = 
'EventLoggingHooks::onPageContentSaveComplete';
 $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 
'EventLoggingHooks::onResourceLoaderGetConfigVars';
 $wgHooks[ 'ResourceLoaderTestModules' ][] = 
'EventLoggingHooks::onResourceLoaderTestModules';

-- 
To view, visit https://gerrit.wikimedia.org/r/68118
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic6e8f24e6d758309d201dc95c16016e823943a5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: Spage <sp...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to