allow usernames to contain numbers, except on first character

This commit is contained in:
Dan Johansen 2021-03-25 18:31:35 +01:00
parent 4fb52674a2
commit 985c4f036f
No known key found for this signature in database
GPG Key ID: 084A7FC0035B1D49
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@ if [ ! -z "$EDITION" ]; then
--inputbox "Enter the username you want:
(usernames most be all lowercase)" 8 50 \
3>&1 1>&2 2>&3 3>&-)
if [[ "$USER" =~ [A-Z] ]] || [[ "$USER" =~ [0-9] ]] || [[ "$USER" == *['!'@#\$%^\&*()_+]* ]]; then
if [[ "$USER" =~ [A-Z] ]] || [[ "$USER" =~ ^[0-9] ]] || [[ "$USER" == *['!'@#\$%^\&*()_+]* ]]; then
clear
msg "Configuration aborted! Username contained invalid characters."
exit 1