Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #5547
Closed
Open
Issue created May 23, 2017 by coudot@coudotReporter

Wrong expiration date shown in ppolicy dashboard

When displaying expired accounts in ppolicy tab of dashboard, wrong expiration date is shown.

Indeed, the dashboard displays shadowExpire value instead of pwdChangedTime value.

Here is the little modifications I made to fix the issue:

In /usr/share/fusiondirectory/plugins/addons/dashboard/users_accounts.tpl, replace shadowExpire in 2 places by:


               {$account.pwdChangedTime}

In /usr/share/fusiondirectory/plugins/addons/dashboard/class_dashBoardPPolicy.inc, replace code after $lastChange->setTimezone(timezone::utc()) by:

      if (($lastChange->getTimeStamp() + $maxAge) < $now->getTimeStamp()) {
        $expired_account = dashboardUsers::get_user_infos($user);
        $expired_account['pwdChangedTime'] = $lastChange->format('Y-m-d H:i:s');
        $expired_accounts[] = $expired_account;
      } elseif (($lastChange->getTimeStamp() + $maxAge) < ($now->getTimeStamp() + $next_expired_days_seconds)) {
        $next_expired_account = dashboardUsers::get_user_infos($user);
        $next_expired_account['pwdChangedTime'] = $lastChange->format('Y-m-d H:i:s');
        $next_expired_accounts[] = $next_expired_account;
      }

I can provide a clean patch if needed.

(from redmine: issue id 5547, created on 2017-05-23, closed on 2017-06-12)

  • Changesets:
    • Revision 5b43fdc2 by Côme Chilliet on 2017-05-24T08:25:55.000Z:
Fixes #5547 Fixed ppolicy expiration date display
  • Revision a4cde4f9ca427926478063d3205b4ed7a6619f8f by Côme Chilliet on 2017-06-07T12:16:52.000Z:
Fixes #5547 Fixed ppolicy expiration date display
  • Custom Fields:
    • Bug in version: 1.1
    • Support contract: None
Assignee
Assign to
Time tracking