From 9c872749a05eee571e9e243904d6e120f7fee900 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 22 Mar 2014 12:15:13 -0700 Subject: [PATCH] Restore psyduck to his proper place Summary: Fixes T4665. The "attachable" logic was a little off after a recent change. Test Plan: With and without a profile image, viewed a page. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T4665 Differential Revision: https://secure.phabricator.com/D8594 --- src/applications/people/storage/PhabricatorUser.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 74df585660..ca55f0cef9 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -652,7 +652,7 @@ EOBODY; } public function loadProfileImageURI() { - if ($this->profileImage && $this->profileImage !== self::ATTACHABLE) { + if ($this->profileImage && ($this->profileImage !== self::ATTACHABLE)) { return $this->profileImage; } @@ -664,13 +664,11 @@ EOBODY; $file = id(new PhabricatorFile())->loadOneWhere('phid = %s', $src_phid); if ($file) { $this->profileImage = $file->getBestURI(); + return $this->profileImage; } } - if (!$this->profileImage) { - $this->profileImage = self::getDefaultProfileImageURI(); - } - + $this->profileImage = self::getDefaultProfileImageURI(); return $this->profileImage; }