mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Fix fatal on setting default profile picture
Summary: I thought I fixed this but must have not saved in my editor or something. Fixes T3552. Test Plan: Set profile image to default. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3552 Differential Revision: https://secure.phabricator.com/D6477
This commit is contained in:
parent
8190b16c60
commit
ad38252c68
1 changed files with 5 additions and 1 deletions
|
@ -78,7 +78,11 @@ final class PhabricatorPeopleProfilePictureController
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$errors) {
|
if (!$errors) {
|
||||||
|
if ($is_default) {
|
||||||
|
$user->setProfileImagePHID(null);
|
||||||
|
} else {
|
||||||
$user->setProfileImagePHID($xformed->getPHID());
|
$user->setProfileImagePHID($xformed->getPHID());
|
||||||
|
}
|
||||||
$user->save();
|
$user->save();
|
||||||
return id(new AphrontRedirectResponse())->setURI($profile_uri);
|
return id(new AphrontRedirectResponse())->setURI($profile_uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue