diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-08-20 15:07:18 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-08-20 15:07:18 +0000 |
commit | 72a904c5007dae6cee52ce88241fbe4358e27878 (patch) | |
tree | 215d5ad475b6fc6ebd3827ed5887efe8cc86bedb /phpBB/includes/functions.php | |
parent | 23e3766497d2c17213a5ff4ab52bcd1722f1cebb (diff) | |
download | forums-72a904c5007dae6cee52ce88241fbe4358e27878.tar forums-72a904c5007dae6cee52ce88241fbe4358e27878.tar.gz forums-72a904c5007dae6cee52ce88241fbe4358e27878.tar.bz2 forums-72a904c5007dae6cee52ce88241fbe4358e27878.tar.xz forums-72a904c5007dae6cee52ce88241fbe4358e27878.zip |
fix for bug #14165... hopefully
git-svn-id: file:///svn/phpbb/trunk@8057 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c00406512b..d9f8256483 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2293,8 +2293,10 @@ function login_forum_box($forum_data) if ($password) { // Remove expired authorised sessions - $sql = 'SELECT session_id - FROM ' . SESSIONS_TABLE; + $sql = 'SELECT f.session_id + FROM ' . FORUMS_ACCESS_TABLE . ' f + LEFT JOIN ' . SESSIONS_TABLE . ' s ON (f.session_id = s.session_id) + WHERE s.session_id IS NULL'; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -2308,7 +2310,7 @@ function login_forum_box($forum_data) // Remove expired sessions $sql = 'DELETE FROM ' . FORUMS_ACCESS_TABLE . ' - WHERE ' . $db->sql_in_set('session_id', $sql_in, true); + WHERE ' . $db->sql_in_set('session_id', $sql_in); $db->sql_query($sql); } $db->sql_freeresult($result); |