id = $id; $this->name = $name; $this->actor = $actor; } /** * @return int The user ID. May be 0 for anonymous users or for users with no local account. */ public function getId() { return $this->id; } /** * @return string The user's logical name. May be an IPv4 or IPv6 address for anonymous users. */ public function getName() { return $this->name; } /** * @return int The user's actor ID. May be 0 if no actor ID has been assigned. */ public function getActorId() { return $this->actor; } /** * @since 1.32 * * @param UserIdentity $user * @return bool */ public function equals( UserIdentity $user ) { // XXX it's not clear whether central ID providers are supposed to obey this return $this->getName() === $user->getName(); } }