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\getInsertValues(), ActorMigration\getInsertValuesWithTempTable(), and User\newFromIdentity().

◆ getId()

◆ getName()

MediaWiki\User\UserIdentity::getName ( )
Since
1.31
Returns
string The user's logical name. May be an IPv4 or IPv6 address for anonymous users.

Implemented in User, and MediaWiki\User\UserIdentityValue.

Referenced by MediaWiki\User\UserIdentityValue\equals(), User\equals(), ActorMigration\getInsertValues(), ActorMigration\getInsertValuesWithTempTable(), and User\newFromIdentity().

◆ 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 WatchedItemStore\addWatchBatchForUser(), WatchedItemStore\getNotificationTimestampsBatch(), WatchedItemStore\getWatchedItem(), WatchedItemQueryService\getWatchedItemsForUser(), WatchedItemStore\loadWatchedItem(), WatchedItemStore\removeWatchBatchForUser(), WatchedItemStore\resetAllNotificationTimestampsForUser(), WatchedItemStore\resetNotificationTimestamp(), and WatchedItemStore\setNotificationTimestampsForUser().


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