From a8a5c91cbe07fc695609af5ae804afae8f3ae337 Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Sat, 18 Mar 2006 23:08:59 +0000 Subject: [PATCH] Backporting a change to the forward ported......oh forget it :P git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5664 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/sessions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index bc5b7da5d0..1931179bc1 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -511,6 +511,15 @@ function session_reset_keys($user_id, $user_ip) message_die(CRITICAL_ERROR, 'Error removing auto-login keys', '', __LINE__, __FILE__, $sql); } + $where_sql = 'session_user_id = ' . (int) $user_id; + $where_sql .= ($user_id == $userdata['user_id']) ? "' AND session_id <> '" . $userdata['session_id'] . "'" : ''; + $sql = 'DELETE FROM ' . SESSIONS_TABLE . " + WHERE $where_sql; + if ( !$db->sql_query($sql) ) + { + message_die(CRITICAL_ERROR, 'Error removing user session(s)', '', __LINE__, __FILE__, $sql); + } + if ( !empty($key_sql) ) { $auto_login_key = dss_rand() . dss_rand();