Something went wrong while setting issue due date.
Wrong expiration date shown in ppolicy dashboard
Closed
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