root / drupal7 / sites / all / modules / ldap / ldap_authorization / ldap_authorization.api.php @ 91af538d
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Summary of hooks and other developer related functions.
|
6 |
*/
|
7 |
|
8 |
/**
|
9 |
* Allow a custom module to alter ldap_authorization mappings.
|
10 |
*
|
11 |
* @param object $user
|
12 |
* as drupal acct object.
|
13 |
* @param array $ldap_user
|
14 |
* See ldap_authentication/README.developers.txt for structure.
|
15 |
* @param LdapServer $ldap_server
|
16 |
* The ldap server associated with this consumer type.
|
17 |
* @param LdapAuthorizationConsumerConf $consumer_conf
|
18 |
* The ldap consumer configuraion associated with this consumer type.
|
19 |
* @param array $proposed_ldap_authorizations
|
20 |
* with keys of consumer ids
|
21 |
* and values of consumers (drupal roles, og entity, etc.)
|
22 |
*
|
23 |
*
|
24 |
* alters $proposed_ldap_authorizations by reference.
|
25 |
*/
|
26 |
function hook_ldap_authorization_maps_alter($user, $ldap_user, $ldap_server, $consumer_conf, $proposed_ldap_authorizations, $op) { |
27 |
|
28 |
} |
29 |
|
30 |
/**
|
31 |
* Allow a custom module to alter ldap_authorizations after they have been determined by ldap_authorizations,
|
32 |
* but before they are granted/removed from user.
|
33 |
*
|
34 |
* @param array $authorizations
|
35 |
* as proposed authorizations for user.
|
36 |
* will be in format returned by LdapAuthorizationConsumerX::populateConsumersFromConsumerIds.
|
37 |
*
|
38 |
* @param array $params
|
39 |
* with the following key/value pairs
|
40 |
* 'ldap_user' => See ldap_authentication/README.developers.txt for structure
|
41 |
* 'ldap_server' => the LdapServer object for this consumer type
|
42 |
* 'consumer' => LdapAuthorizationConsumerX object
|
43 |
* 'user' => Drupal user account object
|
44 |
*
|
45 |
* alters $proposed_ldap_authorizations by reference.
|
46 |
*/
|
47 |
function hook_ldap_authorization_authorizations_alter($authorizations, $params) { |
48 |
|
49 |
// Alter authorizations.
|
50 |
} |