MediaWiki
master
|
Value object representing a user's identity. More...
Public Member Functions | |
__construct (int $id, string $name, $wikiId=self::LOCAL) | |
__toString () | |
equals (?UserIdentity $user) | |
getActorId ( $wikiId=self::LOCAL) | |
getId ( $wikiId=self::LOCAL) | |
The numerical user ID provided to the constructor. More... | |
getName () | |
getWikiId () | |
Get the ID of the wiki this UserIdentity belongs to. More... | |
isRegistered () | |
![]() | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). More... | |
Static Public Member Functions | |
static | newAnonymous (string $name, $wikiId=self::LOCAL) |
Create UserIdentity for an anonymous user. More... | |
static | newExternal (string $prefix, string $name, $wikiId=self::LOCAL) |
Create UserIdentity for an external user with $prefix and $name. More... | |
static | newRegistered (int $userId, string $name, $wikiId=self::LOCAL) |
Create UserIdentity for a registered user. More... | |
Value object representing a user's identity.
Definition at line 35 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::__construct | ( | int | $id, |
string | $name, | ||
$wikiId = self::LOCAL |
|||
) |
int | $id | user ID |
string | $name | user name |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 62 of file UserIdentityValue.php.
References MediaWiki\DAO\assertWikiIdParam(), and wfDeprecatedMsg().
MediaWiki\User\UserIdentityValue::__toString | ( | ) |
Definition at line 187 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::equals | ( | ?UserIdentity | $user | ) |
UserIdentity | null | $user |
Implements MediaWiki\User\UserIdentity.
Definition at line 168 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getActorId | ( | $wikiId = self::LOCAL | ) |
string | false | $wikiId |
Definition at line 157 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getId | ( | $wikiId = self::LOCAL | ) |
The numerical user ID provided to the constructor.
string | false | $wikiId | The wiki ID expected by the caller |
Implements MediaWiki\User\UserIdentity.
Definition at line 138 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getName | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 146 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::getWikiId | ( | ) |
Get the ID of the wiki this UserIdentity belongs to.
Implements MediaWiki\DAO\WikiAwareEntity.
Definition at line 127 of file UserIdentityValue.php.
MediaWiki\User\UserIdentityValue::isRegistered | ( | ) |
Implements MediaWiki\User\UserIdentity.
Definition at line 183 of file UserIdentityValue.php.
|
static |
Create UserIdentity for an anonymous user.
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 87 of file UserIdentityValue.php.
Referenced by MediaWiki\Block\DatabaseBlock\doAutoblock().
|
static |
Create UserIdentity for an external user with $prefix and $name.
string | $prefix | |
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 114 of file UserIdentityValue.php.
|
static |
Create UserIdentity for a registered user.
int | $userId | |
string | $name | |
string | false | $wikiId | wiki ID or self::LOCAL for the local wiki |
Definition at line 100 of file UserIdentityValue.php.