mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
Delete sessions of users that are made inactive
git-svn-id: file:///svn/phpbb/trunk@1910 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
324b8041a9
commit
5e4bb146a3
1 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue