forked from misd-service-development/drupal-raven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raven.api.php
69 lines (63 loc) · 1.48 KB
/
raven.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
<?php
/**
* @file
* Hooks provided by the Raven authentication module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alter the Raven user when registering.
*
* This is called when the user does not exist with Drupal but is logging in with Raven.
*
* @param array $edit
* Edits to be made.
* @param StdClass $account
* User account. As this is a new user, this is almost empty.
*
* @see hook_raven_migrate_alter()
* @see hook_raven_login_alter()
*/
function hook_raven_register_alter(&$edit, $account) {
// Change the email address
$edit['mail'] = '[email protected]';
}
/**
* Alter the Raven user when migrating.
*
* This is called when the user exists in Drupal and is logging in with Raven for the first time.
*
* @param array $edit
* Edits to be made.
* @param StdClass $account
* User account.
*
* @see hook_raven_register_alter()
* @see hook_raven_login_alter()
*/
function hook_raven_migrate_alter(&$edit, $account) {
// Change the email address
$edit['mail'] = '[email protected]';
}
/**
* Alter the Raven user when logging in.
*
* This is called when the user exists in Drupal and has logged in with Raven before.
*
* @param array $edit
* Edits to be made.
* @param StdClass $account
* User account.
*
* @see hook_raven_register_alter()
* @see hook_raven_migrate_alter()
*/
function hook_raven_login_alter(&$edit, $account) {
// Change the email address
$edit['mail'] = '[email protected]';
}
/**
* @} End of "addtogroup hooks".
*/