diff options
-rw-r--r-- | src/Jasny/Auth.php | 4 | ||||
-rw-r--r-- | src/Jasny/Auth/Sessions.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Jasny/Auth.php b/src/Jasny/Auth.php index 5966165..cb7b5e5 100644 --- a/src/Jasny/Auth.php +++ b/src/Jasny/Auth.php @@ -103,7 +103,7 @@ abstract class Auth if (!$user->onLogin()) return false; self::$user = $user; - static::storeCurrentUser(); + static::persistCurrentUser(); return true; } @@ -119,7 +119,7 @@ abstract class Auth $user->onLogout(); static::$user = null; - static::storeCurrentUser(); + static::persistCurrentUser(); } /** diff --git a/src/Jasny/Auth/Sessions.php b/src/Jasny/Auth/Sessions.php index 3e2ba3a..77aaba4 100644 --- a/src/Jasny/Auth/Sessions.php +++ b/src/Jasny/Auth/Sessions.php @@ -26,6 +26,6 @@ trait Sessions */ protected static function getCurrentUserId() { - return $_SESSION['auth_uid']; + return isset($_SESSION['auth_uid']) ? $_SESSION['auth_uid'] : null; } } |