diff options
author | msquare <msquare@notrademark.de> | 2016-09-30 18:49:33 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-09-30 18:49:33 +0200 |
commit | 6dfefc3bb9f054c472156801e37300059444ecc7 (patch) | |
tree | 1917fda87003323126b8d7312b3f54b31f27dee0 /includes/sys_auth.php | |
parent | b87eb49b9324a56da723804e088415d52df77d77 (diff) |
small code improvements
Diffstat (limited to 'includes/sys_auth.php')
-rw-r--r-- | includes/sys_auth.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/sys_auth.php b/includes/sys_auth.php index 39f4d4b0..27a74ae8 100644 --- a/includes/sys_auth.php +++ b/includes/sys_auth.php @@ -13,12 +13,14 @@ function load_auth() { // User ist eingeloggt, Datensatz zur Verfügung stellen und Timestamp updaten list($user) = $user; sql_query("UPDATE `User` SET " . "`lastLogIn` = '" . time() . "'" . " WHERE `UID` = '" . sql_escape($_SESSION['uid']) . "' LIMIT 1;"); - } else { - unset($_SESSION['uid']); + $privileges = privileges_for_user($user['UID']); + return; } + unset($_SESSION['uid']); } - $privileges = isset($user) ? privileges_for_user($user['UID']) : privileges_for_group(- 1); + // guest privileges + $privileges = privileges_for_group(- 1); } /** |