This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpbs_passport.api.php
70 lines (61 loc) · 1.71 KB
/
pbs_passport.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* @file
* Hooks provided by the PBS Passport module.
*/
/**
* Alter a Drupal user before it is created by the PBS Passport module.
*
* @param array $edit
* An array of basic user information just before it is saved.
* @param array $pbs_user
* PBS account user information.
*
* @see pbs_passport_oauth2_callback()
*/
function hook_pbs_passport_user_presave_alter(array &$edit, array $pbs_user) {
}
/**
* Take action after a Drupal user is created by the PBS Passport module.
*
* @param object $user
* A fully-loaded user object.
* @param array $pbs_user
* PBS account user information.
*
* @see pbs_passport_oauth2_callback()
*/
function hook_pbs_passport_user_insert_alter(&$user, array $pbs_user) {
}
/**
* Take action after PBS authentication and before final Drupal login.
*
* This happens before the local database cache of PBS user data is updated.
*
* @param object $user
* A fully-loaded user object.
* @param array $pbs_user
* PBS account user information.
*
* @see pbs_passport_oauth2_callback()
*/
function hook_pbs_passport_user_login($user, array $pbs_user) {
}
/**
* Alter the response after a Passport membership lookup.
*
* Data used for the lookup email is pulled from the first record in the
* $response array ($response[0]). This hook can be used for custom processing
* of multiple memberships or for modifications of membership data.
*
* @param array $response
* The response array from the lookup.
* @param array $form
* The lookup form array.
* @param array $form_state
* The lookup form state array.
*
* @see pbs_passport_lookup_form_submit()
*/
function hook_pbs_passport_lookup_alter(array &$response, array $form, array $form_state) {
}