diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 732010f2ba..bd899961d2 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -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); }