diff options
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r-- | inc/user.inc.php | 7 |
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()) |