While I have been able to use the LDAP authentication hook (hook_ldap_authentication_allowuser_results_alter
) to perform additional authentication, I have not been able to use what I thought was the LDAP authorization hook (hook_ldap_authorization_maps_alter
, defined in the LDAP authorization module, file ldap_authorization.api.php) – the hook never gets executed.
The purpose is to assign user roles to newly created, LDAP-authenticated accounts (therefore I need a Drupal ID). We can’t currently use LDAP-Drupal user role mappings because our LDAP does not contain the necessary information to determine the role; instead we need to tap a different database to determine this, and I was hoping that there would a hook somewhere during account creation.