summaryrefslogtreecommitdiff
path: root/includes/sys_auth.php
diff options
context:
space:
mode:
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