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:
@@ -29,8 +29,8 @@ if (!strlen($username)) {
|
||||
}
|
||||
|
||||
if (!PhabricatorUser::validateUsername($username)) {
|
||||
echo "The username '{$username}' is invalid. Usernames must consist of only ".
|
||||
"numbers and letters.\n";
|
||||
$valid = PhabricatorUser::describeValidUsername();
|
||||
echo "The username '{$username}' is invalid. {$valid}\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user