diff --git a/app/core/User.php b/app/core/User.php index 36cc687..d58453e 100644 --- a/app/core/User.php +++ b/app/core/User.php @@ -1,6 +1,6 @@ username = $this->session->get('username'); $this->password = $this->session->get('password'); - if (!$this->authenticate($this->username, $this->password)) { + if (!$this->authenticate($this->username, $this->password)) + { $this->logout(); $this->session->flash('Kontodetaljer endret, vennligst logg inn igjen', 'warning'); } @@ -49,7 +50,7 @@ class User // Check if user and pass match private function authenticate(string $username, string $password): bool { - if ($username === 'Willaiam' && $password === 'William') + if ($username === 'William' && $password === 'William') { return TRUE; } @@ -59,8 +60,8 @@ class User public function logout(): void { $this->session->set('loggedIn', FALSE); - $this->session->remove('username', FALSE); - $this->session->remove('password', FALSE); + $this->session->remove('username'); + $this->session->remove('password'); $this->setProperties(); } } \ No newline at end of file