diff options
Diffstat (limited to 'src/web/helpers')
-rw-r--r-- | src/web/helpers/auth.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/helpers/auth.php b/src/web/helpers/auth.php index 187f556..4d7f184 100644 --- a/src/web/helpers/auth.php +++ b/src/web/helpers/auth.php @@ -34,6 +34,11 @@ class AuthHelper { file_put_contents($path, $data, LOCK_EX); } + public function delete_session(Session $session): int { + $path = "/tmp/{$session->token}"; + return unlink($path) ? 0 : 1; + } + /** * Loads the auth session associated with a specific key * @param string $token - the session $key |