You are here

function hook_simple_ldap_role_exclude_alter in Simple LDAP 7.2

Alter excluded groups during role saving.

This hook is called when determining whether a role should be synced with LDAP. The list of roles to exclude will usually include "anonymous user" and "authenticated user".

This example excludes the role MY_OTHER_RID in addition to any other roles being excluded from syncronization.

Parameters

array $exclude: Array of rids to ignore during syncronization.

3 invocations of hook_simple_ldap_role_exclude_alter()
simple_ldap_role_sync_user_to_drupal in simple_ldap_role/simple_ldap_role.module
Synchronize LDAP groups to Drupal roles.
simple_ldap_role_sync_user_to_ldap in simple_ldap_role/simple_ldap_role.module
Implements hook_sync_user_to_ldap().
simple_ldap_role_user_presave in simple_ldap_role/simple_ldap_role.module
Implements hook_user_presave().

File

simple_ldap_role/simple_ldap_role.api.php, line 55
Describe hooks provided by the Simple LDAP Role module.

Code

function hook_simple_ldap_role_exclude_alter(&$exclude) {
  $exclude[] = MY_OTHER_RID;
}