Avoid unstubbing $wgUser during AbortAutoAccount hook

At this point $wgUser->getId() will be 0 anyway because the $wgUser is
in the process of being created, so skip the call.

Bug: T124367
Change-Id: I4c6c999f1799db6ff21db3d9df537da643442d27
This commit is contained in:
Brad Jorsch 2016-02-03 12:51:40 -05:00 committed by BryanDavis
parent 4875efcb5d
commit c0c4e390b9

View file

@ -351,7 +351,7 @@ class AbuseFilterHooks {
// Add variables only for a registered user, so IP addresses of
// new users won't be exposed
global $wgUser;
if ( $wgUser->getId() ) {
if ( !$autocreate && $wgUser->getId() ) {
$vars->addHolders( AbuseFilter::generateUserVars( $wgUser ) );
}