summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-03 01:48:51 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-03 01:48:51 +0000
commit5b8c204f4d9b7eae1200ceb896af4e8f351a1dea (patch)
tree790bbad20e7dc52ab9af16eba82c8957687886e3 /etc/inc/auth.inc
parent43829638759e5722bf90cef5222a4725f0bbe0ea (diff)
downloadpfsense-5b8c204f4d9b7eae1200ceb896af4e8f351a1dea.zip
pfsense-5b8c204f4d9b7eae1200ceb896af4e8f351a1dea.tar.gz
* Remove trailing blank line
* Make sure $info has data before operating on it
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 12c9635..773181f 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -815,10 +815,12 @@ function ldap_get_groups($username) {
$info = ldap_get_entries($ldap, $search);
/* find home container */
- foreach($info as $inf) {
- $inf_split = split(",", $inf['dn']);
- $ou = $inf_split[1];
- }
+ if($info) {
+ foreach($info as $inf) {
+ $inf_split = split(",", $inf['dn']);
+ $ou = $inf_split[1];
+ }
+ }
if(!$ou) {
log_error("Could not resolve users home container for {$username}");
@@ -1005,4 +1007,4 @@ function index_users() {
return ($userindex);
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud