MediaWiki master
|
Interface for objects representing user identity. More...
Inherits MediaWiki\DAO\WikiAwareEntity.
Inherited by MediaWiki\User\User, and MediaWiki\User\UserIdentityValue.
Public Member Functions | |
equals (?UserIdentity $user) | |
getId ( $wikiId=self::LOCAL) | |
getName () | |
isRegistered () | |
This must be equivalent to getId() != 0 and is provided for code readability. | |
Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity | |
assertWiki ( $wikiId) | |
Throws if $wikiId is different from the return value of getWikiId(). | |
getWikiId () | |
Get the ID of the wiki this page belongs to. | |
Interface for objects representing user identity.
This represents the identity of a user in the context of page revisions and log entries.
Definition at line 39 of file UserIdentity.php.
MediaWiki\User\UserIdentity::equals | ( | ?UserIdentity | $user | ) |
UserIdentity | null | $user |
Implemented in MediaWiki\User\User, and MediaWiki\User\UserIdentityValue.
Referenced by MediaWiki\Block\BlockPermissionChecker\checkBlockPermissions().
MediaWiki\User\UserIdentity::getId | ( | $wikiId = self::LOCAL | ) |
string | false | $wikiId | The wiki ID expected by the caller |
Implemented in MediaWiki\User\User, and MediaWiki\User\UserIdentityValue.
Referenced by MediaWiki\Block\BlockCacheKey\__construct(), MediaWiki\Deferred\UserEditCountUpdate\__construct(), MediaWiki\User\ActorCache\add(), MediaWiki\Permissions\PermissionManager\addTemporaryUserRights(), MediaWiki\Block\BlockPermissionChecker\checkBlockPermissions(), MediaWiki\User\TalkPageNotificationManager\clearForPageView(), MediaWiki\User\UserEditTracker\clearUserEditCache(), MediaWiki\Watchlist\WatchedItemStore\countUnreadNotifications(), WikiPage\doUpdateRestrictions(), MediaWiki\Api\ApiBlock\execute(), MediaWiki\User\ActorMigrationBase\getInsertValues(), MediaWiki\Watchlist\WatchlistManager\getTitleNotificationTimestamp(), MediaWiki\User\UserEditTracker\incrementUserEditCount(), LogFormatter\makeUserLink(), RecentChange\newForCategorization(), MediaWiki\Watchlist\ClearUserWatchlistJob\newForUser(), MediaWiki\Watchlist\WatchedItemStore\resetAllNotificationTimestampsForUser(), MediaWiki\User\UserEditTracker\setCachedUserEditCount(), and MediaWiki\User\Options\LocalUserOptionsStore\store().
MediaWiki\User\UserIdentity::getName | ( | ) |
Implemented in MediaWiki\User\User, and MediaWiki\User\UserIdentityValue.
Referenced by MediaWiki\Pager\ContributionsPager\__construct(), MediaWiki\User\ActorCache\add(), MediaWiki\Storage\PageEditStash\checkCache(), MediaWiki\Password\PasswordPolicyChecks\checkPasswordCannotBeSubstringInUsername(), MediaWiki\Password\PasswordPolicyChecks\checkPasswordCannotMatchDefaults(), WikiPage\doEditUpdates(), MediaWiki\Specials\SpecialBlock\execute(), MediaWiki\Api\ApiQueryUserInfo\getCentralUserInfo(), MediaWiki\User\ActorMigrationBase\getInsertValues(), MediaWiki\User\Options\StaticUserOptionsLookup\getOptions(), MediaWiki\Specials\SpecialContributions\getResultsPageTitleMessageKey(), MediaWiki\Specials\SpecialDeletedContributions\getResultsPageTitleMessageKey(), MediaWiki\Parser\Parser\getUserSig(), MediaWiki\User\UserIdentityUtils\isNamed(), MediaWiki\User\UserIdentityUtils\isTemp(), LogFormatter\makeUserLink(), RecentChange\newForCategorization(), MediaWiki\Storage\DerivedPageDataUpdater\prepareContent(), WikiPage\prepareContentForEdit(), MediaWiki\Specials\SpecialUserRights\saveUserGroups(), UploadBase\setSessionStatus(), MediaWiki\Storage\PageUpdater\updateAuthor(), and MediaWiki\Specials\SpecialUserRights\userCanChangeRights().
MediaWiki\User\UserIdentity::isRegistered | ( | ) |
This must be equivalent to getId() != 0 and is provided for code readability.
There is no equivalent utility for checking whether a user is temporary, since that would introduce a service dependency. Use UserIdentityUtils::isTemp (or UserNameUtils::isTemp) instead.
Implemented in MediaWiki\User\User, and MediaWiki\User\UserIdentityValue.
Referenced by MediaWiki\Storage\PageEditStash\checkCache(), MediaWiki\Watchlist\WatchlistManager\getTitleNotificationTimestamp(), MediaWiki\Parser\Parser\getUserSig(), MediaWiki\Watchlist\WatchedItemStore\getWatchedItem(), MediaWiki\Watchlist\WatchedItemQueryService\getWatchedItemsForUser(), MediaWiki\User\UserIdentityUtils\isNamed(), MediaWiki\Watchlist\WatchedItemStore\loadWatchedItemsBatch(), MediaWiki\Watchlist\WatchedItemStore\resetAllNotificationTimestampsForUser(), and MediaWiki\Specials\SpecialUserRights\userCanChangeRights().