MediaWiki REL1_33
|
A CentralIdLookup provider that just uses local IDs. More...
Public Member Functions | |
isAttached (User $user, $wikiId=null) | |
Check that a User is attached on the specified wiki. | |
lookupCentralIds (array $idToName, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given central user IDs, return the (local) user names. | |
lookupUserNames (array $nameToId, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given (local) user names, return the central IDs. | |
Public Member Functions inherited from CentralIdLookup | |
centralIdFromLocalUser (User $user, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given a local User object, return the central ID. | |
centralIdFromName ( $name, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given a (local) user name, return the central ID. | |
centralIdsFromNames (array $names, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given an array of (local) user names, return the central IDs. | |
getProviderId () | |
localUserFromCentralId ( $id, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given a central user ID, return a local User object. | |
nameFromCentralId ( $id, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given a central user ID, return the (local) user name. | |
namesFromCentralIds (array $ids, $audience=self::AUDIENCE_PUBLIC, $flags=self::READ_NORMAL) | |
Given a an array of central user IDs, return the (local) user names. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CentralIdLookup | |
static | factory ( $providerId=null) |
Fetch a CentralIdLookup. | |
static | resetCache () |
Reset internal cache for unit testing. | |
Public Attributes inherited from CentralIdLookup | |
const | AUDIENCE_PUBLIC = 1 |
const | AUDIENCE_RAW = 2 |
Public Attributes inherited from IDBAccessObject | |
const | READ_LOCKING = self::READ_LATEST | 2 |
Constants for object loading bitfield flags (higher => higher QoS) | |
const | READ_NONE = -1 |
Protected Member Functions inherited from CentralIdLookup | |
checkAudience ( $audience) | |
Check that the "audience" parameter is valid. | |
A CentralIdLookup provider that just uses local IDs.
Useful if the wiki isn't part of a cluster or you're using shared user tables.
Definition at line 33 of file LocalIdLookup.php.
Check that a User is attached on the specified wiki.
If unattached local accounts don't exist in your extension, this comes down to a check whether the central account exists at all and that $wikiId is using the same central database.
User | $user | |
string | null | $wikiId | Wiki to check attachment status. If null, check the current wiki. |
Reimplemented from CentralIdLookup.
Definition at line 35 of file LocalIdLookup.php.
References $wgLocalDatabases, $wgSharedDB, $wgSharedTables, and and().
LocalIdLookup::lookupCentralIds | ( | array | $idToName, |
$audience = self::AUDIENCE_PUBLIC, | |||
$flags = self::READ_NORMAL ) |
Given central user IDs, return the (local) user names.
array | $idToName | Array with keys being central user IDs |
int | User | $audience | One of the audience constants, or a specific user |
int | $flags | IDBAccessObject read flags |
Reimplemented from CentralIdLookup.
Definition at line 55 of file LocalIdLookup.php.
References $options, $res, $tables, and(), CentralIdLookup\checkAudience(), list, and wfGetDB().
LocalIdLookup::lookupUserNames | ( | array | $nameToId, |
$audience = self::AUDIENCE_PUBLIC, | |||
$flags = self::READ_NORMAL ) |
Given (local) user names, return the central IDs.
array | $nameToId | Array with keys being canonicalized user names |
int | User | $audience | One of the audience constants, or a specific user |
int | $flags | IDBAccessObject read flags |
Reimplemented from CentralIdLookup.
Definition at line 86 of file LocalIdLookup.php.
References $options, $res, $tables, and(), CentralIdLookup\checkAudience(), list, and wfGetDB().