commit f29477e50f78d9fcb24378e671463a9cfb46d920 parent 4a556b1c82de81ae948fa10420c7624d28413c77 Author: Felicitus <felicitus@felicitus.org> Date: Wed, 29 Jun 2011 20:13:49 +0200 Bugfix for invalidating sessions Diffstat:
M | src/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php | | | 2 | +- |
M | src/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php | | | 4 | ++-- |
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php b/src/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php @@ -28,7 +28,7 @@ class AuthService extends AnonService { if ($authenticatedUser !== false) { /* Start Session */ - SessionManager::getInstance()->invalidateSession($session->getSessionID()); + SessionManager::getInstance()->invalidateSession(); $session = SessionManager::getInstance()->startSession($authenticatedUser); diff --git a/src/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php b/src/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php @@ -18,9 +18,9 @@ class SessionManager extends Singleton { * Invalidates the given session. * @param string $sessionid The session id */ - public function invalidateSession ($sessionid) { + public function invalidateSession () { $query = PartKeepr::getEM()->createQuery("DELETE FROM de\RaumZeitLabor\PartKeepr\Session\Session s WHERE s.sessionid = :sessionid"); - $query->setParameter("sessionid", $sessionid); + $query->setParameter("sessionid", session_id()); $query->execute(); }