function hook_janrain_capture_user_authenticated in Janrain Registration 7.3
Same name and namespace in other branches
- 8 janrain_capture.api.php \hook_janrain_capture_user_authenticated()
- 7.4 janrain_capture.api.php \hook_janrain_capture_user_authenticated()
- 7 janrain_capture.api.php \hook_janrain_capture_user_authenticated()
- 7.2 janrain_capture.api.php \hook_janrain_capture_user_authenticated()
Act on users when authenticated
This hook is executed immediately after the user authentication method is processed but before the page is rendered. Modules may use this to act on user data received during authentication.
Parameters
array $capture_profile: The profile data returned from the user's Capture record
array $account: The local Drupal user account being authenticated
boolean $new_user: TRUE if this is the users first time to this site
1 invocation of hook_janrain_capture_user_authenticated()
- janrain_capture_oauth in includes/
janrain_capture.endpoints.inc - Callback for the janrain_capture/oauth menu item. This serves as the redirect_uri Capture redirects the user to and performs the authentication.
File
- ./
janrain_capture.api.php, line 21 - Hooks provided by Janrain Capture
Code
function hook_janrain_capture_user_authenticated($capture_profile, $account, $new_user) {
if ($new_user) {
$params['account'] = $account;
// EXAMPLE:
// Execute the welcome_message_mail function with key being either 'male',
// 'female', or null.
drupal_mail('welcome_message', $capture_profile['gender'], $account->mail, user_preferred_language($account), $params);
}
}