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