Code: Select all
case 'purge_sessions':
if ((int) $user->data['user_type'] !== USER_FOUNDER)
{
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$tables = array(CONFIRM_TABLE, SESSIONS_TABLE);
foreach ($tables as $table)
{
switch ($db->sql_layer)
{
case 'sqlite':
case 'firebird':
$db->sql_query("DELETE FROM $table");
break;
default:
$db->sql_query("TRUNCATE TABLE $table");
break;
}
}
I think so, usually an appropriated WHERE clause will work.. AFAIRivobg92 wrote:I guess that there's just the need to change the query a little bit so that it deletes only the entries with that user id, nothing more is required?