Page MenuHomePhabricator

D18901.diff
No OneTemporary

D18901.diff

diff --git a/scripts/user/account_admin.php b/scripts/user/account_admin.php
--- a/scripts/user/account_admin.php
+++ b/scripts/user/account_admin.php
@@ -112,17 +112,6 @@
$create_email = $email;
}
-$changed_pass = false;
-// This disables local echo, so the user's password is not shown as they type
-// it.
-phutil_passthru('stty -echo');
-$password = phutil_console_prompt(
- pht('Enter a password for this user [blank to leave unchanged]:'));
-phutil_passthru('stty echo');
-if (strlen($password)) {
- $changed_pass = $password;
-}
-
$is_system_agent = $user->getIsSystemAgent();
$set_system_agent = phutil_console_confirm(
pht('Is this user a bot?'),
@@ -158,10 +147,6 @@
if ($is_new) {
printf($tpl, pht('Email'), '', $create_email);
}
-printf($tpl, pht('Password'), null,
- ($changed_pass !== false)
- ? pht('Updated')
- : pht('Unchanged'));
printf(
$tpl,
@@ -218,11 +203,6 @@
$editor->makeAdminUser($user, $set_admin);
$editor->makeSystemAgentUser($user, $set_system_agent);
- if ($changed_pass !== false) {
- $envelope = new PhutilOpaqueEnvelope($changed_pass);
- $editor->changePassword($user, $envelope);
- }
-
$user->saveTransaction();
echo pht('Saved changes.')."\n";
diff --git a/src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php b/src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php
--- a/src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php
+++ b/src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php
@@ -9,8 +9,8 @@
->setExamples('**recover** __username__')
->setSynopsis(
pht(
- 'Recover access to an administrative account if you have locked '.
- 'yourself out of Phabricator.'))
+ 'Recover access to an account if you have locked yourself out '.
+ 'of Phabricator.'))
->setArguments(
array(
'username' => array(
@@ -21,23 +21,6 @@
}
public function execute(PhutilArgumentParser $args) {
-
- $can_recover = id(new PhabricatorPeopleQuery())
- ->setViewer($this->getViewer())
- ->withIsAdmin(true)
- ->execute();
- if (!$can_recover) {
- throw new PhutilArgumentUsageException(
- pht(
- 'This Phabricator installation has no recoverable administrator '.
- 'accounts. You can use `%s` to create a new administrator '.
- 'account or make an existing user an administrator.',
- 'bin/accountadmin'));
- }
- $can_recover = mpull($can_recover, 'getUsername');
- sort($can_recover);
- $can_recover = implode(', ', $can_recover);
-
$usernames = $args->getArg('username');
if (!$usernames) {
throw new PhutilArgumentUsageException(
@@ -57,18 +40,8 @@
if (!$user) {
throw new PhutilArgumentUsageException(
pht(
- 'No such user "%s". Recoverable administrator accounts are: %s.',
- $username,
- $can_recover));
- }
-
- if (!$user->getIsAdmin()) {
- throw new PhutilArgumentUsageException(
- pht(
- 'You can only recover administrator accounts, but %s is not an '.
- 'administrator. Recoverable administrator accounts are: %s.',
- $username,
- $can_recover));
+ 'No such user "%s" to recover.',
+ $username));
}
if (!$user->canEstablishWebSessions()) {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 17, 6:30 AM (5 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7707882
Default Alt Text
D18901.diff (3 KB)

Event Timeline