the hook_init does not always run on a page load and i found that while using my webserver auth hacks after logging in it seemed that those files were not included.

as a quick hack i made this change:

function _ldapgroups_detect_groups($user) {
global $_ldapgroups_ldap;
include_once(drupal_get_path('module', 'ldapgroups') .'/ldap_integration/ldapgroups.conf.php'); <-- my changes
require_once(drupal_get_path('module', 'ldapgroups') .'/ldap_integration/LDAPInterface.php'); <-- my changes
// Nothing to do if the user is not LDAP authentified
// or there are no groups configured.

As they are require and include once i don't think it matters that those lines appear more than once.

Comments

johnbarclay’s picture

My patch also moves the require files out of init. But to make sure its not included unless group detection is being done.

http://drupal.org/node/318174

silid’s picture

Very nice work. I am currently using mapping in the config file.

Hopefully this will be applied in the next release along with the NTLM bits. I will be a happy man.

johnbarclay’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.