Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/68118
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging
refs/changes/18/68118/1
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: newchange
Gerrit-Change-Id: Ic6e8f24e6d758309d201dc95c16016e823943a5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits