mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
sessions with status blocked or wrong password could not be deleted from access log (to unblock an account)
This commit is contained in:
parent
4ed5c57364
commit
e6dffefdd0
@ -86,10 +86,10 @@ class admin_accesslog
|
||||
|
||||
foreach($rows as &$row)
|
||||
{
|
||||
$row['sessionstatus'] = lang('success');
|
||||
$row['sessionstatus'] = 'success';
|
||||
if ($row['notification_heartbeat'] > $heartbeat_limit_user)
|
||||
{
|
||||
$row['sessionstatus'] = lang('active');
|
||||
$row['sessionstatus'] = 'active';
|
||||
}
|
||||
if (stripos($row['session_php'],'blocked') !== false ||
|
||||
stripos($row['session_php'],'bad login') !== false ||
|
||||
@ -99,7 +99,7 @@ class admin_accesslog
|
||||
}
|
||||
if ($row['lo']) {
|
||||
$row['total'] = ($row['lo'] - $row['li']) / 60;
|
||||
$row['sessionstatus'] = lang('logged out');
|
||||
$row['sessionstatus'] = 'logged out';
|
||||
}
|
||||
// eg. for bad login or password
|
||||
if (!$row['account_id']) $row['alt_loginid'] = ($row['loginid']?$row['loginid']:lang('none'));
|
||||
@ -110,10 +110,12 @@ class admin_accesslog
|
||||
$row['class'] .= ' rowNoDelete ';
|
||||
}
|
||||
// do not allow to delete access log off active sessions
|
||||
if (!$row['lo'] && $row['session_dla'] > time()-$GLOBALS['egw_info']['server']['sessions_timeout'] && !$query['session_list'])
|
||||
if (!$row['lo'] && $row['session_dla'] > time()-$GLOBALS['egw_info']['server']['sessions_timeout'] &&
|
||||
in_array($row['sessionstatus'], array('active', 'success')) && !$query['session_list'])
|
||||
{
|
||||
$row['class'] .= ' rowNoDelete ';
|
||||
}
|
||||
$row['sessionstatus'] = lang($row['sessionstatus']);
|
||||
unset($row['session_php']); // for security reasons, do NOT give real PHP sessionid to UI
|
||||
}
|
||||
if ($query['session_list'])
|
||||
|
Loading…
Reference in New Issue
Block a user