fixed bug when loading a profile with no additional groups set
This commit is contained in:
parent
66f164dd6a
commit
19cad31616
|
@ -1476,6 +1476,7 @@ function createuser($values, $uselamdaemon=true) {
|
||||||
if (isset($values->general_groupadd[0]))
|
if (isset($values->general_groupadd[0]))
|
||||||
// Loop for every group
|
// Loop for every group
|
||||||
foreach ($values->general_groupadd as $group2) {
|
foreach ($values->general_groupadd as $group2) {
|
||||||
|
if (! isset($group2) || ($group2 == "")) continue;
|
||||||
// Search for group in LDAP
|
// Search for group in LDAP
|
||||||
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_GroupSuffix(), "(&(objectclass=posixGroup)(cn=$group2))", array(''));
|
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_GroupSuffix(), "(&(objectclass=posixGroup)(cn=$group2))", array(''));
|
||||||
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
|
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
|
||||||
|
|
Loading…
Reference in New Issue