show 389ds lock status
This commit is contained in:
parent
016025fe2d
commit
616b11e362
|
@ -809,6 +809,7 @@ class lamUserList extends lamList {
|
||||||
$attrs[] = 'userPassword';
|
$attrs[] = 'userPassword';
|
||||||
$attrs[] = 'userAccountControl';
|
$attrs[] = 'userAccountControl';
|
||||||
$attrs[] = 'nsAccountLock';
|
$attrs[] = 'nsAccountLock';
|
||||||
|
$attrs[] = 'accountUnlockTime';
|
||||||
$attrs[] = 'objectClass';
|
$attrs[] = 'objectClass';
|
||||||
}
|
}
|
||||||
return $attrs;
|
return $attrs;
|
||||||
|
@ -872,8 +873,9 @@ class lamUserList extends lamList {
|
||||||
$ppolicyLocked = self::isPPolicyLocked($attrs);
|
$ppolicyLocked = self::isPPolicyLocked($attrs);
|
||||||
$windowsLocked = self::isWindowsLocked($attrs);
|
$windowsLocked = self::isWindowsLocked($attrs);
|
||||||
$is389dsDeactivated = self::is389dsDeactivated($attrs);
|
$is389dsDeactivated = self::is389dsDeactivated($attrs);
|
||||||
$partiallyLocked = $unixLocked || $sambaLocked || $ppolicyLocked || $windowsLocked || $is389dsDeactivated;
|
$is389dsLocked = self::is389dsLocked($attrs);
|
||||||
$fullyLocked = ($unixAvailable || $sambaAvailable || $ppolicyAvailable || $windowsAvailable || $is389dsDeactivated)
|
$partiallyLocked = $unixLocked || $sambaLocked || $ppolicyLocked || $windowsLocked || $is389dsDeactivated || $is389dsLocked;
|
||||||
|
$fullyLocked = ($unixAvailable || $sambaAvailable || $ppolicyAvailable || $windowsAvailable || $is389dsDeactivated || $is389dsLocked)
|
||||||
&& (!$unixAvailable || $unixLocked)
|
&& (!$unixAvailable || $unixLocked)
|
||||||
&& (!$sambaAvailable || $sambaLocked)
|
&& (!$sambaAvailable || $sambaLocked)
|
||||||
&& (!$ppolicyAvailable || $ppolicyLocked)
|
&& (!$ppolicyAvailable || $ppolicyLocked)
|
||||||
|
@ -920,6 +922,10 @@ class lamUserList extends lamList {
|
||||||
}
|
}
|
||||||
$tipContent .= '<tr><td>' . _('Windows') . ' </td><td><img height=16 width=16 src="../../graphics/' . $windowsIcon . '"></td></tr>';
|
$tipContent .= '<tr><td>' . _('Windows') . ' </td><td><img height=16 width=16 src="../../graphics/' . $windowsIcon . '"></td></tr>';
|
||||||
}
|
}
|
||||||
|
// 389 locked
|
||||||
|
if ($is389dsLocked) {
|
||||||
|
$tipContent .= '<tr><td>' . _('Locked') . ' </td><td><img height=16 width=16 src="../../graphics/lock.png"></td></tr>';
|
||||||
|
}
|
||||||
// 389 deactivation
|
// 389 deactivation
|
||||||
if ($is389dsDeactivated) {
|
if ($is389dsDeactivated) {
|
||||||
$tipContent .= '<tr><td>' . _('Deactivated') . ' </td><td><img height=16 width=16 src="../../graphics/lock.png"></td></tr>';
|
$tipContent .= '<tr><td>' . _('Deactivated') . ' </td><td><img height=16 width=16 src="../../graphics/lock.png"></td></tr>';
|
||||||
|
@ -1022,6 +1028,16 @@ class lamUserList extends lamList {
|
||||||
return (isset($attrs['nsaccountlock'][0]) && ($attrs['nsaccountlock'][0] == 'true'));
|
return (isset($attrs['nsaccountlock'][0]) && ($attrs['nsaccountlock'][0] == 'true'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if locked by accountUnlockTime.
|
||||||
|
*
|
||||||
|
* @param array $attrs LDAP attributes
|
||||||
|
* @return boolean account is locked
|
||||||
|
*/
|
||||||
|
public static function is389dsLocked(&$attrs) {
|
||||||
|
return (isset($attrs['accountunlocktime'][0]) && !empty($attrs['accountunlocktime'][0]));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue