Skip to content

Commit

Permalink
changed order of posix check
Browse files Browse the repository at this point in the history
refs #9950

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
  • Loading branch information
Aaron Collins authored and lippserd committed Sep 25, 2015
1 parent 73715c9 commit 23631c8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ protected function initializeConversionRules()
*/
public function getMemberships(User $user)
{
$queryUsername = $user->getUsername();

if (($userDn = $user->getAdditional('ldap_dn')) === null) {
$userQuery = $this->ds
->select()
Expand All @@ -497,10 +499,7 @@ public function getMemberships(User $user)
$userQuery->where(new Expression($this->userFilter));
}

if ($this->groupClass == 'posixGroup') {
$queryUsername = $user->getUsername();
}
else {
if ($this->groupClass != 'posixGroup') {
if (($queryUsername = $userQuery->fetchDn()) === null) {
return array();
}
Expand Down

0 comments on commit 23631c8

Please sign in to comment.