From: Tim Düsterhus Date: Wed, 17 Feb 2021 15:05:54 +0000 (+0100) Subject: Return AvatarDecorator in UserProfile::getAvatar() X-Git-Tag: 5.4.0_Alpha_1~238^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=16a5ab6a4598345137e86a9c3b1d76994c74c74d;p=GitHub%2FWoltLab%2FWCF.git Return AvatarDecorator in UserProfile::getAvatar() --- 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;