Allow usernames to include ".", "-" and "_"
Summary: See T1303, which presents a reasonable case for inclusion of these characters in valid usernames. Also, unify username validity handling. Test Plan: Created a new user with a valid name. Tried to create a new user with an invalid name. Ran unit tests. Reviewers: btrahan, vrana Reviewed By: btrahan CC: aran Maniphest Tasks: T1303 Differential Revision: https://secure.phabricator.com/D2651
This commit is contained in:
@@ -65,7 +65,7 @@ final class PhabricatorOAuthDefaultRegistrationController
|
||||
$errors[] = 'Username is required.';
|
||||
} else if (!PhabricatorUser::validateUsername($username)) {
|
||||
$e_username = 'Invalid';
|
||||
$errors[] = 'Username must consist of only numbers and letters.';
|
||||
$errors[] = PhabricatorUser::describeValidUsername();
|
||||
} else {
|
||||
$e_username = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user