summaryrefslogtreecommitdiff
path: root/includes/sys_auth.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-11-12 14:41:23 +0100
committermsquare <msquare@notrademark.de>2018-12-02 12:53:31 +0100
commitc33940f64a1e5b59afd700010247382f5b7b2df3 (patch)
tree453b8810c90cd78e75a1425a4f4f002e585d121a /includes/sys_auth.php
parent951828a4f1175f99666a48629ea125640cc7c598 (diff)
Moved permission checks to Authenticator class
Diffstat (limited to 'includes/sys_auth.php')
-rw-r--r--includes/sys_auth.php27
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