summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2024-10-11 14:09:09 +0200
committerSimon Rettberg2024-10-11 14:09:09 +0200
commitbd8569e1c7e615541e41b8aa8f7aa6f22918dd06 (patch)
tree850fca09e6ceea00fd5c18e0dacadb7f788e1fc9 /inc/user.inc.php
parent[webinterface] Add simple API to remotely supply a certificate (diff)
downloadslx-admin-bd8569e1c7e615541e41b8aa8f7aa6f22918dd06.tar.gz
slx-admin-bd8569e1c7e615541e41b8aa8f7aa6f22918dd06.tar.xz
slx-admin-bd8569e1c7e615541e41b8aa8f7aa6f22918dd06.zip
[webinterface] Add event log messages for cert changes
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 9ef27cd0..dd94ab71 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -30,6 +30,13 @@ class User
return self::$user['fullname'];
}
+ public static function getLogin(): ?string
+ {
+ if (!self::isLoggedIn())
+ return null;
+ return self::$user['login'];
+ }
+
public static function hasPermission(string $permission, ?int $locationid = NULL): bool
{
if (!self::isLoggedIn())