fixed error messages when getgid() is called for nonexisting group
This commit is contained in:
parent
d58048c975
commit
a2a3fb9bde
|
@ -265,6 +265,7 @@ class cache {
|
|||
*/
|
||||
function getgid($groupname) {
|
||||
$dn_groups = $_SESSION['cache']->get_cache(array('gidNumber', 'cn'), 'posixGroup', 'group');
|
||||
if (is_array($dn_groups)) {
|
||||
$DNs = array_keys($dn_groups);
|
||||
foreach ($DNs as $DN) {
|
||||
if ($dn_groups[$DN]['cn'][0] == $groupname) {
|
||||
|
@ -272,6 +273,7 @@ class cache {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* This function will return an array with all groupnames
|
||||
|
|
Loading…
Reference in New Issue