Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / includes / User.php
index 605dab6..6df41ee 100644 (file)
@@ -1591,7 +1591,7 @@ class User implements IDBAccessObject {
                # We only need to worry about passing the IP address to the Block generator if the
                # user is not immune to autoblocks/hardblocks, and they are the current user so we
                # know which IP address they're actually coming from
-               if ( !$this->isAllowed( 'ipblock-exempt' ) && $this->getID() == $wgUser->getID() ) {
+               if ( !$this->isAllowed( 'ipblock-exempt' ) && $this->equals( $wgUser ) ) {
                        $ip = $this->getRequest()->getIP();
                } else {
                        $ip = null;
@@ -3709,14 +3709,6 @@ class User implements IDBAccessObject {
                Hooks::run( 'UserSaveSettings', array( $this ) );
                $this->clearSharedCache();
                $this->getUserPage()->invalidateCache();
-
-               // T95839: clear the cache again post-commit to reduce race conditions
-               // where stale values are written back to the cache by other threads.
-               // Note: this *still* doesn't deal with REPEATABLE-READ snapshot lag...
-               $that = $this;
-               $dbw->onTransactionIdle( function() use ( $that ) {
-                       $that->clearSharedCache();
-               } );
        }
 
        /**