Commit 43656b3d authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5734-no-acls-for-dashboard' into '1.3-dev'

Resolve "No ACLs for dashboard"

See merge request fusiondirectory/fd!96
Showing with 24 additions and 12 deletions
+24 -12
...@@ -140,9 +140,8 @@ class dashboardUsers extends simplePlugin ...@@ -140,9 +140,8 @@ class dashboardUsers extends simplePlugin
function expired_accounts_info () function expired_accounts_info ()
{ {
global $config; global $config;
/*
* Begin of code for selecting expired account /* Begin of code for selecting expired account */
*/
/* getting the date in TIMESTAMP UNIX format */ /* getting the date in TIMESTAMP UNIX format */
/* 24 * 60 * 60 = 86400 */ /* 24 * 60 * 60 = 86400 */
...@@ -152,17 +151,30 @@ class dashboardUsers extends simplePlugin ...@@ -152,17 +151,30 @@ class dashboardUsers extends simplePlugin
$next_expired_days = $config->get_cfg_value('dashboardExpiredAccountsDays', 15); $next_expired_days = $config->get_cfg_value('dashboardExpiredAccountsDays', 15);
$next_expired_date = ($today + $next_expired_days); $next_expired_date = ($today + $next_expired_days);
if (!class_available('posixAccount')) {
/* if shadowExpire is not available no way to check expiration */
return array(
'columns' => $this->expiredAccountsColumns,
'accounts' => array(),
'accounts_next_days' => array(),
'next_days' => $next_expired_days,
);
}
/* search all account with all date, mail, telephone */ /* search all account with all date, mail, telephone */
try { try {
$users = objects::ls('user', array( $attributes = array(
'dn' => 'raw', 'dn' => 'raw',
'uid' => 'raw', 'uid' => 'raw',
'cn' => 'raw', 'cn' => 'raw',
'mail' => 'raw', 'telephoneNumber' => 'raw',
'telephoneNumber' => 'raw', 'manager' => 'raw',
'manager' => 'raw', 'shadowExpire' => 1,
'shadowExpire' => 1, );
), NULL, '(shadowExpire=*)', TRUE); if (class_available('mailAccount')) {
$attributes['mail'] = 'raw';
}
$users = objects::ls('user', $attributes, NULL, '(shadowExpire=*)', TRUE);
} catch (LDAPFailureException $e) { } catch (LDAPFailureException $e) {
msg_dialog::display( msg_dialog::display(
_('LDAP error'), _('LDAP error'),
......
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