Show only valid users

This commit is contained in:
Bob Mottram 2016-10-17 18:17:11 +01:00
parent 6ea08a43a8
commit 161875525d
2 changed files with 10 additions and 6 deletions

View File

@ -1302,9 +1302,11 @@ function select_user {
name=() name=()
for u in ${users_array[@]} for u in ${users_array[@]}
do do
if [[ $(is_valid_user "$u") == "1" ]]; then
i=$((i+1)) i=$((i+1))
W+=($i "$u") W+=($i "$u")
name+=("$u") name+=("$u")
fi
done done
user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3) user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)

View File

@ -396,9 +396,11 @@ function select_user {
name=() name=()
for u in ${users_array[@]} for u in ${users_array[@]}
do do
if [[ $(is_valid_user "$u") == "1" ]]; then
i=$((i+1)) i=$((i+1))
W+=($i "$u") W+=($i "$u")
name+=("$u") name+=("$u")
fi
done done
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3) user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)