From: Mischa POSLAWSKY Date: Sat, 7 Jul 2018 20:37:39 +0000 (+0200) Subject: login/list: indicate admins by suffix description X-Git-Tag: v3.4~7 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/d254e367684dcbde047f8f76fd9df3dd9ed3cf34 login/list: indicate admins by suffix description Like login/visits. --- diff --git a/auth.inc.php b/auth.inc.php index af02ec3..fc30ccf 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -18,6 +18,11 @@ class User { return @file_get_contents("{$this->dir}/name.txt"); } + + function admin() + { + return @file_exists("{$this->dir}/.admin"); + } } function login_password_verify($input, $test) diff --git a/login/list.php b/login/list.php index 5c551f3..cae89f0 100644 --- a/login/list.php +++ b/login/list.php @@ -36,6 +36,10 @@ foreach ($users as $user) { $avatar, $name ); break; + default: + if ($user->admin) { + $name .= ' (beheerder)'; + } } print '
  • '.$name;