# 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;
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();
- } );
}
/**