Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289246

Change subject: Revert "Avoid DBPerformance log warnings in onUserLogout()"
......................................................................

Revert "Avoid DBPerformance log warnings in onUserLogout()"

This reverts commit 7935ca7fef62342e96ffd0b0d86168686ebeaabb.

This was breaking central logout on beta.

Bug: T135525
Bug: T92357
Change-Id: Iaa568849c88f2d8801606d5def821e9a1b56a311
---
M includes/CentralAuthHooks.php
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/46/289246/1

diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index b84bcae..58364d4 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -674,18 +674,17 @@
         */
        static function onUserLogout( &$user ) {
                global $wgCentralAuthCookies;
-
                if ( !$wgCentralAuthCookies ) {
                        // Use local sessions only.
                        return true;
                }
+               $centralUser = CentralAuthUser::getMasterInstance( $user );
 
-               DeferredUpdates::addCallableUpdate( function() use ( $user ) {
-                       $centralUser = CentralAuthUser::getMasterInstance( 
$user );
-                       if ( $centralUser->exists() ) {
+               if ( $centralUser->exists() ) {
+                       DeferredUpdates::addCallableUpdate( function() use ( 
$centralUser ) {
                                $centralUser->resetAuthToken();
-                       }
-               } );
+                       } );
+               }
 
                // Clean up any possible forced rename markers
                $user->getRequest()->setSessionData( 'CentralAuthForcedRename', 
null );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa568849c88f2d8801606d5def821e9a1b56a311
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org>

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

Reply via email to