mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-28 02:36:08 +08:00
replace lowerName with name
This commit is contained in:
@@ -832,10 +832,8 @@ export function isValidUsername(name) {
|
||||
} else if (!(/[a-z]/).test(name.charAt(0))) {
|
||||
error = 'First character must be a letter.';
|
||||
} else {
|
||||
var lowerName = name;
|
||||
|
||||
for (var i = 0; i < Constants.RESERVED_USERNAMES.length; i++) {
|
||||
if (lowerName === Constants.RESERVED_USERNAMES[i]) {
|
||||
if (name === Constants.RESERVED_USERNAMES[i]) {
|
||||
error = 'Cannot use a reserved word as a username.';
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user