Differential D10412 Diff 25069 src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
} | } | ||||
} | } | ||||
if (!$errors) { | if (!$errors) { | ||||
if ($is_default) { | if ($is_default) { | ||||
$user->setProfileImagePHID(null); | $user->setProfileImagePHID(null); | ||||
} else { | } else { | ||||
$user->setProfileImagePHID($xformed->getPHID()); | $user->setProfileImagePHID($xformed->getPHID()); | ||||
$xformed->attachToObject($viewer, $user->getPHID()); | $xformed->attachToObject($user->getPHID()); | ||||
} | } | ||||
$user->save(); | $user->save(); | ||||
return id(new AphrontRedirectResponse())->setURI($profile_uri); | return id(new AphrontRedirectResponse())->setURI($profile_uri); | ||||
} | } | ||||
} | } | ||||
$title = pht('Edit Profile Picture'); | $title = pht('Edit Profile Picture'); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |