1
0
Fork 0
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:
epriestley 2013-07-16 13:54:14 -07:00
parent 8190b16c60
commit ad38252c68

View file

@ -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);
}