tazbug rev 93
Fix users plugin (skip corrupted accounts)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Dec 12 18:21:55 2016 +0100 (2016-12-12) |
parents | 889bf7bc7595 |
children | 972272f78dbd |
files | web/plugins/users/users.cgi |
line diff
1.1 --- a/web/plugins/users/users.cgi Sun Dec 04 15:32:23 2016 +0000 1.2 +++ b/web/plugins/users/users.cgi Mon Dec 12 18:21:55 2016 +0100 1.3 @@ -24,6 +24,11 @@ 1.4 EOT 1.5 for u in $(ls $PEOPLE) 1.6 do 1.7 + # Skip corrupted accounts 1.8 + if ! [ -f "${PEOPLE}/${u}/account.conf" ]; then 1.9 + echo "${u} : Missing account.conf" 1.10 + continue 1.11 + fi 1.12 . "${PEOPLE}/${u}/account.conf" 1.13 cat << EOT 1.14 $(get_gravatar $MAIL 24) <a href="?user=$USER">$USER</a> | $NAME | $MAIL 1.15 @@ -32,7 +37,8 @@ 1.16 #: <a href="?users&deluser=$USER">$(gettext "delete")</a> 1.17 unset NAME USER 1.18 done 1.19 - echo "</pre>" && exit 0 ;; 1.20 + echo "</pre>" 1.21 + html_footer && exit 0 ;; 1.22 1.23 *\ logged\ *) 1.24 # Show online users based on sessions files.