--- cacti-0.8.7g/lib/ldap.php	2010-07-09 18:33:46.000000000 -0400
+++ cacti-0.8.7g-patched/lib/ldap.php	2010-07-27 21:30:31.000000000 -0400
@@ -250,7 +250,7 @@
 			if ($ldap_response) {
 				if ($this->group_require == 1) {
 					/* Process group membership if required */
-					if ($ldap_group_member_type == 1) {
+					if ($this->group_member_type == 1) {
 						$ldap_group_response = @ldap_compare($ldap_conn, $this->group_dn, $this->group_attrib, $this->dn);
 					} else {
 						$ldap_group_response = @ldap_compare($ldap_conn, $this->group_dn, $this->group_attrib, $this->username);
