aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-03-18 23:08:30 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-03-18 23:08:30 +0000
commitb20106ee28d123ab6d4518e148299c1ee14f3c9c (patch)
tree01ef9678f66faae79b1038aa9028f2ba5feb0a59 /phpBB
parent273f1a79eb7f812882a9b4b3264f1a436777532f (diff)
downloadforums-b20106ee28d123ab6d4518e148299c1ee14f3c9c.tar
forums-b20106ee28d123ab6d4518e148299c1ee14f3c9c.tar.gz
forums-b20106ee28d123ab6d4518e148299c1ee14f3c9c.tar.bz2
forums-b20106ee28d123ab6d4518e148299c1ee14f3c9c.tar.xz
forums-b20106ee28d123ab6d4518e148299c1ee14f3c9c.zip
We'll extend the idea to the sessions themselves as well on reflection
git-svn-id: file:///svn/phpbb/trunk@5663 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/session.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index f12332b4db..6a8a79d292 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -779,6 +779,15 @@ class session
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
+ // Let's also clear any current sessions for the specified user_id
+ // If it's the current user then we'll leave this session intact
+ $sql_where = 'session_user_id = ' . (int) $user_id;
+ $sql_where .= ($user_id === $this->data['user_id']) ? " AND session_id <> '" . $this->session_id . "'" : '';
+
+ $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
+ WHERE $sql_where";
+ $db->sql_query($sql);
+
// We're changing the password of the current user and they have a key
// Lets regenerate it to be safe
if ($user_id === $this->data['user_id'] && $this->cookie_data['k'])