MediaWiki  master
MediaWiki\User\UserIdentity Interface Reference

Interface for objects representing user identity. More...

Inheritance diagram for MediaWiki\User\UserIdentity:

Public Member Functions

 equals (UserIdentity $user)
 
 getActorId ()
 
 getId ()
 
 getName ()
 
 isRegistered ()
 

Detailed Description

Interface for objects representing user identity.

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

Since
1.31

Definition at line 32 of file UserIdentity.php.

Member Function Documentation

◆ equals()

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

Implemented in User, and MediaWiki\User\UserIdentityValue.

◆ getActorId()

MediaWiki\User\UserIdentity::getActorId ( )
Since
1.31
Returns
int The user's actor ID. May be 0 if no actor ID is set.

Implemented in MediaWiki\User\UserIdentityValue.

Referenced by ActorMigration\getInsertValuesWithTempTable(), and MediaWiki\User\UserFactory\newFromUserIdentity().

◆ getId()

MediaWiki\User\UserIdentity::getId ( )
Since
1.31
Returns
int The user ID. May be 0 for anonymous users or for users with no local account.

Implemented in User, and MediaWiki\User\UserIdentityValue.

Referenced by MediaWiki\Permissions\PermissionManager\addTemporaryUserRights(), MediaWiki\User\UserGroupManager\addUserToAutopromoteOnceGroups(), MediaWiki\User\UserGroupManager\addUserToGroup(), WatchedItemStore\addWatchBatchForUser(), MediaWiki\Block\BlockPermissionChecker\checkBlockPermissions(), MediaWiki\User\WatchlistNotificationManager\clearAllUserNotifications(), MediaWiki\User\UserEditTracker\clearUserEditCache(), WatchedItemStore\clearUserWatchedItems(), WatchedItemStore\countUnreadNotifications(), WatchedItemStore\countWatchedItems(), WatchedItemStore\fetchWatchedItems(), WatchedItemStore\getCacheKey(), ActorMigration\getInsertValues(), ActorMigration\getInsertValuesWithTempTable(), ActorMigration\getNewActorId(), WatchedItemStore\getNotificationTimestampsBatch(), WatchedItemStore\getPageSeenTimestampsKey(), MediaWiki\User\TalkPageNotificationManager\getQueryFieldAndId(), MediaWiki\User\WatchlistNotificationManager\getTitleNotificationTimestamp(), MediaWiki\User\UserEditTracker\getUserEditCount(), MediaWiki\User\UserEditTracker\getUserEditTimestamp(), MediaWiki\User\UserGroupManager\getUserFormerGroups(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), MediaWiki\Permissions\PermissionManager\getUserPermissions(), WatchedItemQueryService\getWatchedItemsForUserQueryConds(), WatchedItemQueryService\getWatchlistOwnerId(), MediaWiki\User\UserEditTracker\initializeUserEditCount(), MediaWiki\User\UserOptionsManager\loadUserOptions(), ClearUserWatchlistJob\newForUser(), MediaWiki\User\UserFactory\newFromUserIdentity(), MediaWiki\User\UserGroupManager\removeUserFromGroup(), WatchedItemStore\removeWatchBatchForUser(), WatchedItemStore\resetAllNotificationTimestampsForUser(), WatchedItemStore\resetNotificationTimestamp(), MediaWiki\User\UserOptionsManager\saveOptions(), WatchedItemStore\setNotificationTimestampsForUser(), WatchedItemStore\uncache(), WatchedItemStore\uncacheAllItemsForUser(), WatchedItemStore\uncacheUser(), and WatchedItemStore\updateNotificationTimestamp().

◆ getName()

◆ isRegistered()

MediaWiki\User\UserIdentity::isRegistered ( )
Since
1.34
Returns
bool True if user is registered on this wiki, i.e., has a user ID. False if user is anonymous or has no local account (which can happen when importing). This must be equivalent to getId() != 0 and is provided for code readability.

Implemented in User, and MediaWiki\User\UserIdentityValue.

Referenced by MediaWiki\User\UserGroupManager\addUserToGroup(), WatchedItemStore\addWatchBatchForUser(), MediaWiki\User\UserOptionsManager\canUseCachedValues(), MediaWiki\User\UserGroupManager\canUseCachedValues(), MediaWiki\User\WatchlistNotificationManager\clearTitleUserNotifications(), MediaWiki\User\UserEditTracker\clearUserEditCache(), MediaWiki\Block\BlockManager\getBlockFromCookieValue(), MediaWiki\User\TalkPageNotificationManager\getCacheKey(), MediaWiki\User\UserOptionsManager\getCacheKey(), MediaWiki\User\UserGroupManager\getCacheKey(), WatchedItemStore\getNotificationTimestampsBatch(), MediaWiki\User\StaticUserOptionsLookup\getOptions(), MediaWiki\User\TalkPageNotificationManager\getQueryFieldAndId(), MediaWiki\Permissions\PermissionManager\getRightsCacheKey(), MediaWiki\User\UserGroupManager\getUserFormerGroups(), MediaWiki\User\UserGroupManager\getUserGroupMemberships(), MediaWiki\User\UserGroupManager\getUserImplicitGroups(), WatchedItemStore\getWatchedItem(), WatchedItemQueryService\getWatchedItemsForUser(), MediaWiki\User\TalkPageNotificationManager\isTalkDisabled(), MediaWiki\User\UserOptionsManager\loadUserOptions(), WatchedItemStore\loadWatchedItem(), MediaWiki\User\UserGroupManager\removeUserFromGroup(), WatchedItemStore\removeWatchBatchForUser(), WatchedItemStore\resetAllNotificationTimestampsForUser(), WatchedItemStore\resetNotificationTimestamp(), MediaWiki\User\UserOptionsManager\saveOptions(), WatchedItemStore\setNotificationTimestampsForUser(), and MediaWiki\User\DefaultOptionsLookup\verifyUsable().


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