function hook_ldap_authorization_authorizations_alter in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/ldap_authorization.api.php \hook_ldap_authorization_authorizations_alter()
Allow a custom module to alter ldap_authorizations after they have been determined by ldap_authorizations, but before they are granted/removed from user.
Parameters
array $authorizations: as proposed authorizations for user. will be in format returned by LdapAuthorizationConsumerX::populateConsumersFromConsumerIds.
array $params: with the following key/value pairs 'ldap_user' => See ldap_authentication/README.developers.txt for structure 'ldap_server' => the LdapServer object for this consumer type 'consumer' => LdapAuthorizationConsumerX object 'user' => Drupal user account object
alters $proposed_ldap_authorizations by reference.
1 invocation of hook_ldap_authorization_authorizations_alter()
- _ldap_authorizations_user_authorizations in ldap_authorization/
ldap_authorization.inc - Return all desired authorizations for a given user.
File
- ldap_authorization/
ldap_authorization.api.php, line 47 - Summary of hooks and other developer related functions.
Code
function hook_ldap_authorization_authorizations_alter($authorizations, $params) {
// Alter authorizations.
}