do not show Unix account status if no password available

This commit is contained in:
Roland Gruber 2013-04-07 17:27:21 +00:00
parent e3514fd253
commit fa037be32a
1 changed files with 2 additions and 2 deletions

View File

@ -806,7 +806,7 @@ class lamUserList extends lamList {
* @return boolean Unix part exists
*/
public static function isUnixAvailable(&$attrs) {
return (isset($attrs['objectclass']) && in_array_ignore_case('posixAccount', $attrs['objectclass']));
return (isset($attrs['objectclass']) && in_array_ignore_case('posixAccount', $attrs['objectclass']) && isset($attrs['userpassword'][0]));
}
/**
@ -816,7 +816,7 @@ class lamUserList extends lamList {
* @return boolean Unix part locked
*/
public static function isUnixLocked(&$attrs) {
return (isset($attrs['userpassword'][0]) && !pwd_is_enabled($attrs['userpassword'][0]));
return ((isset($attrs['userpassword'][0]) && !pwd_is_enabled($attrs['userpassword'][0])));
}
/**