Skip to content

Commit

Permalink
fallback to the general base if user or group base was not set. Fixes #4
Browse files Browse the repository at this point in the history


Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Jun 28, 2019
1 parent 1fca558 commit b364a12
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/LDAPConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,19 @@ public function getLDAPConnection() {
}

public function getLDAPBaseUsers() {
return $this->ldapConfig->ldapBaseUsers;
$bases = $this->ldapConfig->ldapBaseUsers;
if(empty($bases)) {
$bases = $this->ldapConfig->ldapBase;
}
return $bases;
}

public function getLDAPBaseGroups() {
return $this->ldapConfig->ldapBaseGroups;
$bases = $this->ldapConfig->ldapBaseGroups;
if(empty($bases)) {
$bases = $this->ldapConfig->ldapBase;
}
return $bases;
}

public function getDisplayNameAttribute() {
Expand Down

0 comments on commit b364a12

Please sign in to comment.