Ok, I have ldap_integration enabled and I've been trying to get ldapgroups to sync.
The catch: The user has to login two times to get the groups to be assigned.
The first login, they get no groups.

Here's what I've debugged.
The issue lies in ldapauth.module:

$config_name = $ldapauth_ldap->getOption('name');
$userinfo = array('mail' => $mail, 'ldap_dn' => $dn, 'ldap_config' => $config_name);
user_save($user, $userinfo);
return $user;

On my system at least, everything looks good here, but the "$user" object being returned doesn't have any of the new values from user_save attached to it. The issue appears to be that ldap_config goes back as empty string, so when _ldapgroups_ldap_init() gets invoked, it returns false and no groups are assigned.

On the second login, the $user object contains the correct information and everything works.

This sure feels like a cache error but I'm at a total loss for how to investigate any further.

Help?

Comments

suydam’s picture

Oops...this is already being discussed here:
http://drupal.org/node/171092

kreaper’s picture

Assigned: Unassigned » kreaper
Status: Active » Closed (duplicate)