mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00: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:
parent
fb8dc345dd
commit
ba639e20eb
1 changed files with 22 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue