diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-03 01:47:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-03 01:47:48 +0000 |
commit | 43829638759e5722bf90cef5222a4725f0bbe0ea (patch) | |
tree | 686f4a2e3f022ee4efb3cd3a8e1ed5b2978fe88a | |
parent | d2f336469bb1a4ce83fa2c22975bb8135a918686 (diff) | |
download | pfsense-43829638759e5722bf90cef5222a4725f0bbe0ea.zip pfsense-43829638759e5722bf90cef5222a4725f0bbe0ea.tar.gz |
* Remove trailing blank line
* Make sure $search has data before operating on it
-rw-r--r-- | etc/inc/auth.inc | 12 | ||||
-rw-r--r-- | etc/inc/authgui.inc | 2 |
2 files changed, 7 insertions, 7 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}");
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc index 692e070..0df0206 100644 --- a/etc/inc/authgui.inc +++ b/etc/inc/authgui.inc @@ -322,4 +322,4 @@ function display_login_form() { <?php
} // end function
-?>
+?>
\ No newline at end of file |