Unverified Commit 93a61d70 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(dashboard) Fix users expiration date display in user dashboard

issue #6006
Showing with 7 additions and 7 deletions
+7 -7
...@@ -170,11 +170,11 @@ class dashboardUsers extends simplePlugin ...@@ -170,11 +170,11 @@ class dashboardUsers extends simplePlugin
try { try {
$attributes = array( $attributes = array(
'dn' => 'raw', 'dn' => 'raw',
'uid' => 'raw', 'uid' => '*',
'cn' => 'raw', 'cn' => '*',
'telephoneNumber' => 'raw', 'telephoneNumber' => '*',
'manager' => 'raw', 'manager' => '*',
'shadowExpire' => 1, 'shadowExpire' => '*',
); );
if (class_available('mailAccount')) { if (class_available('mailAccount')) {
$attributes['mail'] = 'raw'; $attributes['mail'] = 'raw';
...@@ -200,9 +200,9 @@ class dashboardUsers extends simplePlugin ...@@ -200,9 +200,9 @@ class dashboardUsers extends simplePlugin
$next_expired_accounts = array(); $next_expired_accounts = array();
foreach ($users as $user) { foreach ($users as $user) {
// Test if account is expired now // Test if account is expired now
if ($user['shadowExpire'] <= $today) { if ($user['shadowExpire'][0] <= $today) {
$expired_accounts[] = static::get_user_infos($user); $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); $next_expired_accounts[] = static::get_user_infos($user);
} }
} }
......
  • SonarQube analysis reported 1 issue

    • :arrow_down_small: 1 minor

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. :arrow_down_small: Rename class "tabs_configInLdap" to match the regular expression ^[a-zA-Z][a-zA-Z0-9]*$. :blue_book:

    By Ghost User on 2019-06-27T13:14:06 (imported from GitLab)

  • bmortier @bmortier

    mentioned in commit 247b9f97

    By Côme Chilliet on 2019-06-27T13:24:16 (imported from GitLab)

    ·

    mentioned in commit 247b9f97

    By Côme Chilliet on 2019-06-27T13:24:16 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in merge request !620

    By Côme Chilliet on 2019-06-27T13:24:23 (imported from GitLab)

    ·

    mentioned in merge request !620

    By Côme Chilliet on 2019-06-27T13:24:23 (imported from GitLab)

    Toggle commit list
Supports Markdown
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