@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update "Change Username" instructions to be less foreboding

Summary:
Ref T13420. These warnings are currently more severe than they need to be; weaken them.

Among other cases, the upstream supports and encourages changing usernames when users change human names.

The login/password instructions are also out of date since sessions were decoupled from usernames about a year ago.

Test Plan: Hit dialog as an administrator

Maniphest Tasks: T13420

Differential Revision: https://secure.phabricator.com/D20826

+23 -29
+23 -29
src/applications/people/controller/PhabricatorPeopleRenameController.php
··· 43 43 44 44 } 45 45 46 - $inst1 = pht( 47 - 'Be careful when renaming users!'); 46 + $instructions = array(); 48 47 49 - $inst2 = pht( 50 - 'The old username will no longer be tied to the user, so anything '. 51 - 'which uses it (like old commit messages) will no longer associate '. 52 - 'correctly. (And, if you give a user a username which some other user '. 53 - 'used to have, username lookups will begin returning the wrong user.)'); 54 - 55 - $inst3 = pht( 56 - 'It is generally safe to rename newly created users (and test users '. 57 - 'and so on), but less safe to rename established users and unsafe to '. 58 - 'reissue a username.'); 48 + $instructions[] = pht( 49 + 'If you rename this user, the old username will no longer be tied '. 50 + 'to the user account. Anything which uses the old username in raw '. 51 + 'text (like old commit messages) may no longer associate correctly.'); 59 52 60 - $inst4 = pht( 61 - 'Users who rely on password authentication will need to reset their '. 62 - 'password after their username is changed (their username is part of '. 63 - 'the salt in the password hash).'); 53 + $instructions[] = pht( 54 + 'It is generally safe to rename users, but changing usernames may '. 55 + 'create occasional minor complications or confusion with text that '. 56 + 'contains the old username.'); 64 57 65 - $inst5 = pht( 58 + $instructions[] = pht( 66 59 'The user will receive an email notifying them that you changed their '. 67 - 'username, with instructions for logging in and resetting their '. 68 - 'password if necessary.'); 60 + 'username.'); 61 + 62 + $instructions[] = null; 69 63 70 64 $form = id(new AphrontFormView()) 71 - ->setUser($viewer) 72 65 ->appendChild( 73 66 id(new AphrontFormStaticControl()) 74 67 ->setLabel(pht('Old Username')) ··· 79 72 ->setValue($username) 80 73 ->setName('username')); 81 74 82 - return $this->newDialog() 83 - ->setWidth(AphrontDialogView::WIDTH_FORM) 75 + $dialog = $this->newDialog() 84 76 ->setTitle(pht('Change Username')) 85 - ->setValidationException($validation_exception) 86 - ->appendParagraph($inst1) 87 - ->appendParagraph($inst2) 88 - ->appendParagraph($inst3) 89 - ->appendParagraph($inst4) 90 - ->appendParagraph($inst5) 91 - ->appendParagraph(null) 77 + ->setValidationException($validation_exception); 78 + 79 + foreach ($instructions as $instruction) { 80 + $dialog->appendParagraph($instruction); 81 + } 82 + 83 + $dialog 92 84 ->appendForm($form) 93 85 ->addSubmitButton(pht('Rename User')) 94 86 ->addCancelButton($done_uri); 87 + 88 + return $dialog; 95 89 } 96 90 97 91 }