diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-11-12 14:41:23 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-02 12:53:31 +0100 |
commit | c33940f64a1e5b59afd700010247382f5b7b2df3 (patch) | |
tree | 453b8810c90cd78e75a1425a4f4f002e585d121a /includes/sys_auth.php | |
parent | 951828a4f1175f99666a48629ea125640cc7c598 (diff) |
Moved permission checks to Authenticator class
Diffstat (limited to 'includes/sys_auth.php')
-rw-r--r-- | includes/sys_auth.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/includes/sys_auth.php b/includes/sys_auth.php index 5d2fa8be..520b13eb 100644 --- a/includes/sys_auth.php +++ b/includes/sys_auth.php @@ -1,36 +1,9 @@ <?php -use Carbon\Carbon; use Engelsystem\Database\DB; use Engelsystem\Models\User\User; /** - * Testet ob ein User eingeloggt ist und lädt die entsprechenden Privilegien - */ -function load_auth() -{ - global $privileges; - $session = session(); - - if ($session->has('uid')) { - $user = auth()->user(); - - if ($user) { - $user->last_login_at = new Carbon(); - $user->save(); - - $privileges = privileges_for_user($user->id); - return; - } - - $session->remove('uid'); - } - - // guest privileges - $privileges = privileges_for_group(-10); -} - -/** * generate a salt (random string) of arbitrary length suitable for the use with crypt() * * @param int $length |