foreach ( $toPromote as $group ) {
$this->addGroup( $group );
}
-
// update groups in external authentication database
+ Hooks::run( 'UserGroupsChanged', array( $this, $toPromote, array(), false ) );
$wgAuth->updateExternalDBGroups( $this, $toPromote );
$newGroups = array_merge( $oldGroups, $toPromote ); // all groups
# 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;
global $wgAuth;
$authUser = $wgAuth->getUserInstance( $this );
$this->mLocked = (bool)$authUser->isLocked();
+ Hooks::run( 'UserIsLocked', array( $this, &$this->mLocked ) );
return $this->mLocked;
}
global $wgAuth;
$authUser = $wgAuth->getUserInstance( $this );
$this->mHideName = (bool)$authUser->isHidden();
+ Hooks::run( 'UserIsHidden', array( $this, &$this->mHideName ) );
}
return $this->mHideName;
}
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();
- } );
}
/**