mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +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) {
|
||||
$user->setProfileImagePHID($xformed->getPHID());
|
||||
if ($is_default) {
|
||||
$user->setProfileImagePHID(null);
|
||||
} else {
|
||||
$user->setProfileImagePHID($xformed->getPHID());
|
||||
}
|
||||
$user->save();
|
||||
return id(new AphrontRedirectResponse())->setURI($profile_uri);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue