This commit is contained in:
William 2022-02-07 10:28:28 +01:00
parent 8daea6434c
commit 7cd3213f6e
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class User
public ?bool $loggedIn; public ?bool $loggedIn;
public ?string $username; public ?string $username;
public ?string $password; public ?string $password;
public ?int $level; public ?int $powerLevel;
public function __construct(Session $session, Database $database) public function __construct(Session $session, Database $database)
{ {
@ -35,7 +35,7 @@ class User
$sth->execute([$this->username, $this->password]); $sth->execute([$this->username, $this->password]);
$row = $sth->fetch(PDO::FETCH_ASSOC); $row = $sth->fetch(PDO::FETCH_ASSOC);
$this->level = $row['Nivå']; $this->powerLevel = $row['Nivå'];
} }
} }

View File

@ -41,7 +41,7 @@ $session = new Session;
$user = new User($session, $database); $user = new User($session, $database);
// Decides if the user is allowed to view current page // Decides if the user is allowed to view current page
new AccessControl($user); new AccessControl($user, $config['root_url']);
$app = new App( $app = new App(
$config, $config,