From d254e367684dcbde047f8f76fd9df3dd9ed3cf34 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 7 Jul 2018 22:37:39 +0200 Subject: [PATCH] login/list: indicate admins by suffix description Like login/visits. --- auth.inc.php | 5 +++++ login/list.php | 4 ++++ 2 files changed, 9 insertions(+) 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; -- 2.30.0