🚑 fix(dashboard) Fix users expiration date display in user dashboard

issue #6006
parent b00a2f18
......@@ -170,11 +170,11 @@ class dashboardUsers extends simplePlugin
try {
$attributes = [
'dn' => 'raw',
'uid' => 'raw',
'cn' => 'raw',
'telephoneNumber' => 'raw',
'manager' => 'raw',
'shadowExpire' => 1,
'uid' => '*',
'cn' => '*',
'telephoneNumber' => '*',
'manager' => '*',
'shadowExpire' => '*',
];
if (class_available('mailAccount')) {
$attributes['mail'] = 'raw';
......@@ -200,9 +200,9 @@ class dashboardUsers extends simplePlugin
$next_expired_accounts = [];
foreach ($users as $user) {
// Test if account is expired now
if ($user['shadowExpire'] <= $today) {
if ($user['shadowExpire'][0] <= $today) {
$expired_accounts[] = static::get_user_infos($user);
} elseif ($user['shadowExpire'] <= $next_expired_date) {
} elseif ($user['shadowExpire'][0] <= $next_expired_date) {
$next_expired_accounts[] = static::get_user_infos($user);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment