From 4a50dcfd859f8bebe48f6fdf27dccc783f79e33b Mon Sep 17 00:00:00 2001 From: neen Date: Tue, 26 May 2009 00:28:38 -0700 Subject: [PATCH] * Fixed a bug with sessions --- modules/core/session.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/core/session.inc.php b/modules/core/session.inc.php index 9eb67e80..fe6011a9 100644 --- a/modules/core/session.inc.php +++ b/modules/core/session.inc.php @@ -129,11 +129,17 @@ class CORE_session " . AGILE_DB_PREFIX . "session.id = " . $db->qstr($session_id) . " AND " . AGILE_DB_PREFIX . "session.site_id = " . $db->qstr(DEFAULT_SITE) . " + AND (( + " . AGILE_DB_PREFIX . "account.site_id = " . $db->qstr(DEFAULT_SITE) . " AND - " . AGILE_DB_PREFIX . "account.site_id = " . $db->qstr(DEFAULT_SITE) . " + " . AGILE_DB_PREFIX . "session.account_id IS NOT NULL + ) OR ( + " . AGILE_DB_PREFIX . "account.site_id IS NULL + AND + " . AGILE_DB_PREFIX . "session.account_id IS NULL + )) AND " . AGILE_DB_PREFIX . "session_auth_cache.site_id = " . $db->qstr(DEFAULT_SITE); - $result = $db->Execute($q); if ($result === false) { $C_debug->error('session.inc.php','validate', $db->ErrorMsg());