Set mglnr and password even if user is already logged in

This commit is contained in:
Philipp Lang 2022-03-25 14:39:02 +01:00
parent b95ca75f79
commit a2427fa19d
1 changed files with 3 additions and 3 deletions

View File

@ -17,13 +17,13 @@ class MainCookie extends Authenticator
public function login(int $mglnr, string $password): self public function login(int $mglnr, string $password): self
{ {
$this->mglnr = $mglnr;
$this->password = $password;
if ($this->isLoggedIn()) { if ($this->isLoggedIn()) {
return $this; return $this;
} }
$this->mglnr = $mglnr;
$this->password = $password;
while ($file = $this->file()) { while ($file = $this->file()) {
unlink($file); unlink($file);
} }