mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Refactor v-change-wordpress-admin-passwords to streamline admin list processing by using a here-string for input
This commit is contained in:
parent
1571d60b2f
commit
ca9a939823
1 changed files with 2 additions and 2 deletions
|
@ -62,12 +62,12 @@ ADMIN_LIST_CSV=$(eval "$RUN")
|
|||
DEFAULT_USER=""
|
||||
|
||||
printf "%-6s %-20s %s\n" "ID" "Username" "Email"
|
||||
echo "$ADMIN_LIST_CSV" | while IFS=',' read -r PID PLOGIN PEMAIL; do
|
||||
while IFS=',' read -r PID PLOGIN PEMAIL; do
|
||||
printf "%-6s %-20s %s\n" "$PID" "$PLOGIN" "$PEMAIL"
|
||||
if [ "$PID" = "1" ]; then
|
||||
DEFAULT_USER="$PLOGIN"
|
||||
fi
|
||||
done
|
||||
done <<< "$ADMIN_LIST_CSV"
|
||||
|
||||
echo
|
||||
echo "For each admin choose: (d) delete, (c) change password, (s) skip, (x) exit."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue