aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_users.php
diff options
context:
space:
mode:
authorBart van Bragt <bartvb@users.sourceforge.net>2002-01-18 15:50:58 +0000
committerBart van Bragt <bartvb@users.sourceforge.net>2002-01-18 15:50:58 +0000
commit5e4bb146a38cb5d4762571da0ec990a565f8d8e4 (patch)
treee655e5fe1dd06fb3aa43a50c2f1db78b1861551c /phpBB/admin/admin_users.php
parent324b8041a9848d699f6062c18b4788037fb52656 (diff)
downloadforums-5e4bb146a38cb5d4762571da0ec990a565f8d8e4.tar
forums-5e4bb146a38cb5d4762571da0ec990a565f8d8e4.tar.gz
forums-5e4bb146a38cb5d4762571da0ec990a565f8d8e4.tar.bz2
forums-5e4bb146a38cb5d4762571da0ec990a565f8d8e4.tar.xz
forums-5e4bb146a38cb5d4762571da0ec990a565f8d8e4.zip
Delete sessions of users that are made inactive
git-svn-id: file:///svn/phpbb/trunk@1910 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_users.php')
-rw-r--r--phpBB/admin/admin_users.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index dd23e86f62..e59c93d07d 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -280,6 +280,16 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$error_msg .= $lang['Password_mismatch'];
}
+ if( $user_status == 0 )
+ {
+ // User is (made) inactive. Delete all their sessions.
+ $sql = "DELETE FROM ". SESSIONS_TABLE ." WHERE session_user_id = $user_id";
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete this user's sessions", "", __LINE__, __FILE__, $sql);
+ }
+ }
+
if( $signature != "" )
{
$sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", stripslashes($signature));
@@ -1131,4 +1141,4 @@ else
include('page_footer_admin.'.$phpEx);
-?> \ No newline at end of file
+?>