mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
make sure the session table is empty after conversion and the current session being killed. This makes sure the user converting does not inherit wrong user settings becuase the 3.0.x users table being completely new.
git-svn-id: file:///svn/phpbb/trunk@6964 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -191,7 +191,28 @@ class install_convert extends module
|
||||
'TITLE' => $lang['CONVERT_COMPLETE'],
|
||||
'BODY' => $lang['CONVERT_COMPLETE_EXPLAIN'],
|
||||
));
|
||||
|
||||
|
||||
// If we reached this step (conversion completed) we want to purge the cache and log the user out.
|
||||
// This is for making sure the session get not screwed due to the 3.0.x users table being completely new.
|
||||
$cache->purge();
|
||||
|
||||
// Make sure this session gets killed
|
||||
$user->session_kill();
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'firebird':
|
||||
$db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE);
|
||||
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
|
||||
break;
|
||||
|
||||
default:
|
||||
$db->sql_query('TRUNCATE TABLE ' . SESSIONS_KEYS_TABLE);
|
||||
$db->sql_query('TRUNCATE TABLE ' . SESSIONS_TABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user