From 16a5ab6a4598345137e86a9c3b1d76994c74c74d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 17 Feb 2021 16:05:54 +0100 Subject: [PATCH] Return AvatarDecorator in UserProfile::getAvatar() --- .../install/files/lib/data/user/UserProfile.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index 759834ad42..7d5c3f9b83 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -6,6 +6,7 @@ use wcf\data\DatabaseObjectDecorator; use wcf\data\ITitledLinkObject; use wcf\data\trophy\Trophy; use wcf\data\trophy\TrophyCache; +use wcf\data\user\avatar\AvatarDecorator; use wcf\data\user\avatar\DefaultAvatar; use wcf\data\user\avatar\Gravatar; use wcf\data\user\avatar\IUserAvatar; @@ -71,8 +72,7 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject protected $followingUserIDs; /** - * user avatar - * @var IUserAvatar + * @var AvatarDecorator */ protected $avatar; @@ -327,7 +327,7 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject /** * Returns the user's avatar. * - * @return IUserAvatar + * @return AvatarDecorator */ public function getAvatar() { @@ -378,6 +378,8 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject if ($this->avatar === null) { $this->avatar = new DefaultAvatar($this->username ?: ''); } + + $this->avatar = new AvatarDecorator($this->avatar); } return $this->avatar; -- 2.20.1