login/list: indicate admins by suffix description
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Jul 2018 20:37:39 +0000 (22:37 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Jul 2018 21:52:51 +0000 (23:52 +0200)
Like login/visits.

auth.inc.php
login/list.php

index af02ec3b41b6e915ce3b5fbbc1a2883695db5ab3..fc30ccfa48db240fb1398507f6f66cede496ee1d 100644 (file)
@@ -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)
index 5c551f33e6f6b29b4135833789cf82db28272bc6..cae89f078dab62f64013ec89738428004e46629e 100644 (file)
@@ -36,6 +36,10 @@ foreach ($users as $user) {
                        $avatar, $name
                );
                break;
+       default:
+               if ($user->admin) {
+                       $name .= ' <em>(beheerder)</em>';
+               }
        }
 
        print '<li>'.$name;