Differential D7953 Diff 18009 src/applications/people/controller/PhabricatorPeopleEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/controller/PhabricatorPeopleEditController.php
Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | private function processRoleRequest(PhabricatorUser $user) { | ||||
$admin = $request->getUser(); | $admin = $request->getUser(); | ||||
$is_self = ($user->getID() == $admin->getID()); | $is_self = ($user->getID() == $admin->getID()); | ||||
$errors = array(); | $errors = array(); | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
$log_template = PhabricatorUserLog::newLog( | $log_template = PhabricatorUserLog::initializeNewLog( | ||||
$admin, | $admin, | ||||
$user, | $user->getPHID(), | ||||
null); | null); | ||||
$logs = array(); | $logs = array(); | ||||
if ($is_self) { | if ($is_self) { | ||||
$errors[] = pht("You can not edit your own role."); | $errors[] = pht("You can not edit your own role."); | ||||
} else { | } else { | ||||
$new_admin = (bool)$request->getBool('is_admin'); | $new_admin = (bool)$request->getBool('is_admin'); | ||||
▲ Show 20 Lines • Show All 432 Lines • Show Last 20 Lines |