diff --git a/src/applications/people/controller/PhabricatorPeopleController.php b/src/applications/people/controller/PhabricatorPeopleController.php --- a/src/applications/people/controller/PhabricatorPeopleController.php +++ b/src/applications/people/controller/PhabricatorPeopleController.php @@ -11,17 +11,31 @@ $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); $name = null; + $viewer = $this->getRequest()->getUser(); if ($for_app) { $name = $this->getRequest()->getURIData('username'); if ($name) { $nav->setBaseURI(new PhutilURI('/p/')); $nav->addFilter("{$name}/", $name); $nav->addFilter("{$name}/calendar/", pht('Calendar')); + if ($viewer->getIsAdmin()) { + $user = id(new PhabricatorPeopleQuery()) + ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->withUsernames(array($name)) + ->needUserSettings(false) + ->executeOne(); + $user_id = $user->getID(); + if ($user_id) { + $user_manage_uri = id(new PhutilURI( + $this->getApplicationURI('manage/'.$user_id.'/'))); + $nav->addFilter('manage', pht('Manage %s', $name), + $user_manage_uri); + } + } } } if (!$name) { - $viewer = $this->getRequest()->getUser(); id(new PhabricatorPeopleSearchEngine()) ->setViewer($viewer) ->addNavigationItems($nav->getMenu());