2
0

tab indentation

This commit is contained in:
Sky Johnson 2025-09-11 10:25:02 -05:00
parent 5cc24441d0
commit 65bfec8078
13 changed files with 2286 additions and 2294 deletions

View File

@ -41,9 +41,7 @@ class Auth
$this->session->set(self::SESSION_KEY, $userData);
$this->session->regenerate();
if ($remember) {
$this->createRememberToken($userData);
}
if ($remember) $this->createRememberToken($userData);
}
/**
@ -55,9 +53,7 @@ class Auth
$this->session->set(self::SESSION_KEY, $user->toArray());
$this->session->regenerate();
if ($remember) {
$this->createRememberToken($user->toArray());
}
if ($remember) $this->createRememberToken($user->toArray());
}
/**
@ -92,9 +88,7 @@ class Auth
*/
public function user(): ?User
{
if ($this->user) {
return $this->user;
}
if ($this->user) return $this->user;
// Try to load from session
$userData = $this->session->get(self::SESSION_KEY);
@ -222,9 +216,7 @@ class Auth
{
$cookie = $_COOKIE[$this->config['cookie_name']] ?? null;
if (!$cookie || !str_contains($cookie, '|')) {
return null;
}
if (!$cookie || !str_contains($cookie, '|')) return null;
[$id, $token] = explode('|', $cookie, 2);
$hashedToken = hash('sha256', $token);