MediaWiki REL1_37
MediaWiki\User\UserIdentity Interface Reference

Interface for objects representing user identity. More...

Inheritance diagram for MediaWiki\User\UserIdentity:
Collaboration diagram for MediaWiki\User\UserIdentity:

Public Member Functions

 equals (?UserIdentity $user)
 
 getId ( $wikiId=self::LOCAL)
 
 getName ()
 
 isRegistered ()
 
- 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.
 

Detailed Description

Interface for objects representing user identity.

This represents the identity of a user in the context of page revisions and log entries.

Note
Starting MediaWiki 1.37, UserIdentity objects should no longer expose an actor ID. The actor ID is considered a storage layer optimization and should not be exposed to and used by application logic. Storage layer code should use ActorNormalization to get an actor ID for a UserIdentity.
Since
1.31

Definition at line 39 of file UserIdentity.php.

Member Function Documentation

◆ equals()

MediaWiki\User\UserIdentity::equals ( ?UserIdentity  $user)
Since
1.32
Parameters
UserIdentity | null$user
Returns
bool

Implemented in User, MediaWiki\User\UserIdentityValue, and UserRightsProxy.

Referenced by MediaWiki\Block\BlockPermissionChecker\checkBlockPermissions().

◆ getId()

MediaWiki\User\UserIdentity::getId (   $wikiId = self::LOCAL)
Since
1.31
Parameters
string | false$wikiIdThe wiki ID expected by the caller
Returns
int The user ID. May be 0 for anonymous users or for users with no local account.

Implemented in User, MediaWiki\User\UserIdentityValue, and UserRightsProxy.

Referenced by UserEditCountUpdate\__construct(), MediaWiki\User\ActorCache\add(), MediaWiki\Permissions\PermissionManager\addTemporaryUserRights(), EmailNotification\canSendUserTalkEmail(), MediaWiki\Block\BlockPermissionChecker\checkBlockPermissions(), MediaWiki\User\UserEditTracker\clearUserEditCache(), WatchedItemStore\countUnreadNotifications(), WikiPage\doUpdateRestrictions(), ApiBlock\execute(), WatchedItemStore\fetchWatchedItems(), MediaWiki\Block\BlockErrorFormatter\formatBlockerLink(), ActorMigrationBase\getInsertValues(), ActorMigrationBase\getInsertValuesWithTempTable(), MediaWiki\User\TalkPageNotificationManager\getQueryFieldAndId(), MediaWiki\Watchlist\WatchlistManager\getTitleNotificationTimestamp(), UploadBase\getUploadSessionKey(), MediaWiki\User\UserEditTracker\getUserEditTimestamp(), MediaWiki\Permissions\PermissionManager\getUserPermissions(), WatchedItemQueryService\getWatchedItemsForUserQueryConds(), WatchedItemQueryService\getWatchlistOwnerId(), MediaWiki\Revision\RevisionStore\insertIpChangesRow(), MediaWiki\User\UserOptionsManager\loadOptionsFromDb(), LogFormatter\makeUserLink(), RecentChange\newForCategorization(), ClearUserWatchlistJob\newForUser(), WatchedItemStore\resetAllNotificationTimestampsForUser(), MediaWiki\User\UserOptionsManager\saveOptions(), MediaWiki\User\UserEditTracker\setCachedUserEditCount(), WatchedItemStore\uncache(), WatchedItemStore\uncacheAllItemsForUser(), WatchedItemStore\uncacheUser(), and UserrightsPage\userCanChangeRights().

◆ getName()

◆ isRegistered()


The documentation for this interface was generated from the following file: