diff --git a/app/core/User.php b/app/core/User.php index 2005c35..cff686f 100644 --- a/app/core/User.php +++ b/app/core/User.php @@ -9,7 +9,7 @@ class User public ?bool $loggedIn; public ?string $username; public ?string $password; - public ?int $level; + public ?int $powerLevel; public function __construct(Session $session, Database $database) { @@ -35,7 +35,7 @@ class User $sth->execute([$this->username, $this->password]); $row = $sth->fetch(PDO::FETCH_ASSOC); - $this->level = $row['Nivå']; + $this->powerLevel = $row['Nivå']; } } diff --git a/app/inc.php b/app/inc.php index 5245ab6..7f91430 100644 --- a/app/inc.php +++ b/app/inc.php @@ -41,7 +41,7 @@ $session = new Session; $user = new User($session, $database); // Decides if the user is allowed to view current page -new AccessControl($user); +new AccessControl($user, $config['root_url']); $app = new App( $config,