mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Don't issue unnecssary query when loading user profile images
Summary: Fixes T2264. Test Plan: Loaded profile. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2264 Differential Revision: https://secure.phabricator.com/D4324
This commit is contained in:
parent
ea52c30bca
commit
a5c7286df7
1 changed files with 5 additions and 3 deletions
|
@ -630,9 +630,11 @@ EOBODY;
|
|||
public function loadProfileImageURI() {
|
||||
$src_phid = $this->getProfileImagePHID();
|
||||
|
||||
$file = id(new PhabricatorFile())->loadOneWhere('phid = %s', $src_phid);
|
||||
if ($file) {
|
||||
return $file->getBestURI();
|
||||
if ($src_phid) {
|
||||
$file = id(new PhabricatorFile())->loadOneWhere('phid = %s', $src_phid);
|
||||
if ($file) {
|
||||
return $file->getBestURI();
|
||||
}
|
||||
}
|
||||
|
||||
return self::getDefaultProfileImageURI();
|
||||
|
|
Loading…
Reference in a new issue