summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold Daniels <arnold@jasny.net>2014-10-09 16:28:50 +0200
committerArnold Daniels <arnold@jasny.net>2014-10-09 16:28:50 +0200
commit4e99897ff47fe92f32e4d5859d1eeaf52b88a06f (patch)
tree24acb5a009cb0c6a3e902ec7e4cb765b3886126d
parentc0035358fd7d5f596f232df6c8de1b2221bc6336 (diff)
downloadauth-4e99897ff47fe92f32e4d5859d1eeaf52b88a06f.zip
auth-4e99897ff47fe92f32e4d5859d1eeaf52b88a06f.tar.gz
auth-4e99897ff47fe92f32e4d5859d1eeaf52b88a06f.tar.bz2
Fixed auth sessions
-rw-r--r--src/Jasny/Auth.php4
-rw-r--r--src/Jasny/Auth/Sessions.php2
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;
}
}