summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-03 01:47:48 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-03 01:47:48 +0000
commit43829638759e5722bf90cef5222a4725f0bbe0ea (patch)
tree686f4a2e3f022ee4efb3cd3a8e1ed5b2978fe88a /etc/inc/auth.inc
parentd2f336469bb1a4ce83fa2c22975bb8135a918686 (diff)
downloadpfsense-43829638759e5722bf90cef5222a4725f0bbe0ea.zip
pfsense-43829638759e5722bf90cef5222a4725f0bbe0ea.tar.gz
* Remove trailing blank line
* Make sure $search has data before operating on it
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 262e8ab..12c9635 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -826,18 +826,18 @@ function ldap_get_groups($username) {
return $status;
}
-
- log_error("LDAPGroupAttribute ===== {$ldapgroupattribute}");
+ log_error("LDAPGroupAttribute ===== {$ldapgroupattribute}");
$search = ldap_search($ldap, $ldapauthcontainers, $ldapfilter, array($ldapgroupattribute));
- $info = ldap_get_entries($ldap, $search);
- $countem = $info["count"];
+ if($search) {
+ $info = ldap_get_entries($ldap, $search);
+ $countem = $info["count"];
+ }
$memberof = array();
- log_error("USER HAS {$countem} LDAP Groups it is {$info[0][$ldapgroupattribute][0]}");
+ log_error("USER HAS {$countem} LDAP Groups it is {$info[0][$ldapgroupattribute][0]}");
if(is_array($info[0][$ldapgroupattribute])) {
-
foreach($info[0][$ldapgroupattribute] as $member) {
//$member = strtoupper($member);
log_error("MEMBER===={$member}");
OpenPOWER on IntegriCloud