*/
private static function newFromLookup( $database, $field, $value, $ignoreInvalidDB = false ) {
global $wgSharedDB, $wgSharedTables;
- // If the user table is shared, perform the user query on it, but don't pass it to the UserRightsProxy,
+ // If the user table is shared, perform the user query on it,
+ // but don't pass it to the UserRightsProxy,
// as user rights are normally not shared.
if ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) {
$userdb = self::getDB( $wgSharedDB, $ignoreInvalidDB );
array( 'user_id' => $this->id ),
__METHOD__ );
- global $wgMemc;
+ $cache = ObjectCache::getMainWANInstance();
$key = wfForeignMemcKey( $this->database, false, 'user', 'id', $this->id );
- $wgMemc->delete( $key );
+ $cache->delete( $key );
}
}