70,11 → 70,13 |
# close active sessions |
exec ("sudo /usr/local/sbin/alcasar-logout.sh $login"); |
# delete open accounting sessions |
$now = time(); |
$today_now = date("Y-m-d H:i:s",$now); |
$link = @da_sql_pconnect($config); |
if ($link) |
{ |
$res = @da_sql_query($link,$config, |
"DELETE FROM $config[sql_accounting_table] |
"UPDATE $config[sql_accounting_table] SET acctstoptime = '$today_now', acctterminatecause='Admin-Reset' |
WHERE username='$login' AND acctstoptime IS NULL;"); |
if (! $res) |
echo "<b>Error deleting open sessions for user" . da_sql_error($link,$config) . "</b><br>\n"; |