LSaddon ppolicy: fix badges color of password_expiration extraDisplayedColumn

This commit is contained in:
Benjamin Renard 2022-04-11 19:09:45 +02:00
parent 728be381a6
commit f5d21ec93c

View file

@ -180,9 +180,9 @@ function ppolicy_extraDisplayColumn_password_expiration($entry) {
sprintf(_('Expired (since %s)'), date('Y-m-d H:i', $expiration_date)),
'black');
$delta = $expiration_date - $now;
if ($delta >= LS_PPOLICY_CRITICAL_EXPIRATION_THRESHOLD)
if ($delta <= LS_PPOLICY_CRITICAL_EXPIRATION_THRESHOLD)
$badge_color = 'red';
elseif ($delta >= LS_PPOLICY_WARNING_EXPIRATION_THRESHOLD)
elseif ($delta <= LS_PPOLICY_WARNING_EXPIRATION_THRESHOLD)
$badge_color = 'orange';
else
$badge_color = 'green';