X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fwatcheditem%2FWatchedItem.php;h=4bf7f0c300663240e4e71438dd4f11b7af6261d3;hb=1e289e5424be2bfe62213dde90bea658b874f7e6;hp=43a9c4e53630153592423e8fd7cdbe85e01a7e8b;hpb=3d95da4952619f9f773298c4461ccfc646fb18a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/watcheditem/WatchedItem.php b/includes/watcheditem/WatchedItem.php index 43a9c4e536..4bf7f0c300 100644 --- a/includes/watcheditem/WatchedItem.php +++ b/includes/watcheditem/WatchedItem.php @@ -20,6 +20,7 @@ */ use MediaWiki\Linker\LinkTarget; +use MediaWiki\User\UserIdentity; /** * Representation of a pair of user and title for watchlist entries. @@ -36,7 +37,7 @@ class WatchedItem { private $linkTarget; /** - * @var User + * @var UserIdentity */ private $user; @@ -46,12 +47,12 @@ class WatchedItem { private $notificationTimestamp; /** - * @param User $user + * @param UserIdentity $user * @param LinkTarget $linkTarget * @param null|string $notificationTimestamp the value of the wl_notificationtimestamp field */ public function __construct( - User $user, + UserIdentity $user, LinkTarget $linkTarget, $notificationTimestamp ) { @@ -61,9 +62,17 @@ class WatchedItem { } /** + * @deprecated since 1.34, use getUserIdentity() * @return User */ public function getUser() { + return User::newFromIdentity( $this->user ); + } + + /** + * @return UserIdentity + */ + public function getUserIdentity() { return $this->user; }