From 2626b5f0d6b9ca3b5fd5ac28ac4c098104d2f940 Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Thu, 15 Feb 2024 15:52:46 -0500 Subject: [PATCH] Update SessionGuard to handle logout --- src/Auth/SessionGuard.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Auth/SessionGuard.php b/src/Auth/SessionGuard.php index 972f66f..3cabb3b 100644 --- a/src/Auth/SessionGuard.php +++ b/src/Auth/SessionGuard.php @@ -47,6 +47,18 @@ public function user() return $this->user; } + + /** + * Remove the user data from the session and cookies. + * + * @return void + */ + protected function clearUserDataFromStorage() + { + $this->session->remove($this->getName()); + ee()->session->destroy(); + } + /** * Get a unique identifier for the auth session value. *