Skip to content

Commit

Permalink
Merge pull request #5364 from tysauron/patch-7
Browse files Browse the repository at this point in the history
FIX Simplification + get real DN of user from setup of key (multi d…
  • Loading branch information
eldy committed Jul 20, 2016
2 parents 34d1c0a + 9c63350 commit 548411a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions htdocs/user/class/usergroup.class.php
Expand Up @@ -784,11 +784,8 @@ function _load_ldap_info()
{
$muser=new User($this->db);
$muser->fetch($val->id);
if ($conf->global->LDAP_KEY_USERS == 'cn') $ldapuserid=$muser->getFullName($langs);
elseif ($conf->global->LDAP_KEY_USERS == 'sn') $ldapuserid=$muser->lastname;
elseif ($conf->global->LDAP_KEY_USERS == 'uid') $ldapuserid=$muser->login;

$valueofldapfield[] = $conf->global->LDAP_KEY_USERS.'='.$ldapuserid.','.$conf->global->LDAP_USER_DN;
$info2 = $muser->_load_ldap_info();
$valueofldapfield[] = $muser->_load_ldap_dn($info2);
}
$info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield)?$valueofldapfield:'');
}
Expand Down

0 comments on commit 548411a

Please sign in to comment.