changed order of posix check
refs #9950 Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
This commit is contained in:
parent
73715c94b1
commit
23631c8f39
|
@ -486,6 +486,8 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
|
||||||
*/
|
*/
|
||||||
public function getMemberships(User $user)
|
public function getMemberships(User $user)
|
||||||
{
|
{
|
||||||
|
$queryUsername = $user->getUsername();
|
||||||
|
|
||||||
if (($userDn = $user->getAdditional('ldap_dn')) === null) {
|
if (($userDn = $user->getAdditional('ldap_dn')) === null) {
|
||||||
$userQuery = $this->ds
|
$userQuery = $this->ds
|
||||||
->select()
|
->select()
|
||||||
|
@ -497,10 +499,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
|
||||||
$userQuery->where(new Expression($this->userFilter));
|
$userQuery->where(new Expression($this->userFilter));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->groupClass == 'posixGroup') {
|
if ($this->groupClass != 'posixGroup') {
|
||||||
$queryUsername = $user->getUsername();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (($queryUsername = $userQuery->fetchDn()) === null) {
|
if (($queryUsername = $userQuery->fetchDn()) === null) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue