Aaron Schulz has uploaded a new change for review.

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

Change subject: Switched to using User::touch() to avoid DB write spam
......................................................................

Switched to using User::touch() to avoid DB write spam

Bug: T92357
Change-Id: I442de51ef358b2ccfda0a58978c0659f8cae4859
---
M includes/CentralAuthHooks.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index 28877fb..9acb208 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -1022,9 +1022,7 @@
                wfSetupSession();
                if ( $token != @$_SESSION['globalloggedin'] ) { // FIXME: Usage 
of @
                        $_SESSION['globalloggedin'] = $token;
-                       if ( !wfReadOnly() ) {
-                               $user->invalidateCache();
-                       }
+                       $user->touch();
                        wfDebug( __METHOD__ . ": Initialising session for 
$userName with token $token.\n" );
                } else {
                        wfDebug( __METHOD__ . ": Session already initialised 
for $userName with token $token.\n" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I442de51ef358b2ccfda0a58978c0659f8cae4859
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to