--- ldap_integration.module 2006-06-06 15:32:18.000000000 -0700 +++ /tmp/ldap_integration.module 2006-06-26 15:21:03.000000000 -0700 @@ -643,7 +643,12 @@ function ldap_integration_user_login(&$u if (variable_get('ldap_map_group_signoffs', false)) { // First, we take every mapped role from the user, later below // we'll grant back those deserved. - foreach ($registered_groups as $role) { + foreach ($registered_groups as $group) { + if ($role = $ldap_group_role_mappings[$group]) { + // Just that + } else if (preg_match('/^[^=]*=([^,]*),.*$/', $group, $matches)) { + $role = $matches[1]; + } _ldap_integration_take_role_from_user($user, $role); } } @@ -1126,4 +1131,4 @@ function ldap_integration_pass_submit($f } } -?> \ No newline at end of file +?>