using backgroundupdate

This commit is contained in:
thies
2021-01-10 19:04:01 +01:00
parent 67bd5bc1c7
commit 8ad97c4b62
5 changed files with 12 additions and 178 deletions

View File

@@ -8,21 +8,7 @@
<script src="ressources/js/bootstrap.min.js"></script>
<?php
session_start();
include 'db.inc.php';
$username = $_SESSION['username'];
$statement = $pdo->prepare("SELECT * FROM users WHERE username = :username");
$result = $statement->execute(array('username' => $username));
$user = $statement->fetch();
$_SESSION['userid'] = $user['id'];
$_SESSION['email'] = $user['email'];
$_SESSION['username'] = $user['username'];
$_SESSION['givenName'] = $user['givenName'];
$_SESSION['lastName'] = $user['lastName'];
$_SESSION['activated'] = $user['activated'];
$_SESSION['updated_at'] = $user['updated_at'];
$_SESSION['isadmin'] = $user['isadmin'];
include 'backgroundupdate.php';
if($_SESSION['isadmin'] == 0) {
die ('No rights for you! <meta http-equiv="refresh" content="0; URL=logout.php">');
}