Hi,

I've a bug with new ldap_integration HEAD version.
When a user connects him on my drupal installation for the first time (ldap groups written in ldapgroups.conf.php and indicated in drupal site configuration), the roles created are like this:
"cn=Admins,ou=groups,dc=domain
cn=test_group,ou=groups,dc=domain"
and not like:
"Admins
test_group"

Is it normal ?

Thanks.

Comments

kreaper’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » kreaper
Status: Active » Fixed

Binerf

I just fixed it in the HEAD. Please re-download and test

kreaper

Binerf-1’s picture

I'm sorry but it seems that my problem is not corrected...

dcartertod’s picture

This is happening with me too with the 3rd strategy for groups, i.e. Groups exist as LDAP entries where a multivalued attribute...etc.

The relevant code would be in the 3rd strategy section of _ldapgroups_detect_groups() where

     foreach ($entries as $entry) {
        if (isset($entry['dn'])) {
           $entries_groups[] = $entry['dn'];
        }
     }

I replaced mine with:

      foreach ($entries as $entry) {
        if (isset($entry['dn'])) {
          $pairs = explode(',', $entry['dn']);
          $pair = explode('=',$pairs[0]);
          $entries_groups[] = trim($pair[1]);
        }
      }

And that seemed to fix the problem.

David

Binerf-1’s picture

Yes, with this modification, the problem seems to be corrected.
Thanks

kreaper’s picture

Please do a cvs update and test. In the previous commit, we were not actually using the stripped name :)

dcartertod's code only fixes 1 of the three scenarios, so please don't use it. Thx a lot for the help anyway dcartertod.

regards

kreaper

kreaper’s picture

Binerf

Did you get a chance to test the HEAD ?

Anonymous’s picture

Status: Fixed » Closed (fixed)