You are here

function hook_simple_fb_connect_register_alter in Simple FB Connect 7.2

Same name and namespace in other branches
  1. 7 simple_fb_connect.api.php \hook_simple_fb_connect_register_alter()

This hook allows other modules to change $fields array before new user is created.

Parameters

$fields: The fields array to be stored with user profile in user_save. Modify these values with values from $fb_user_profile to populate User Profile with values from FB while creating new user.

$fb_user_profile: Facebook GraphObject representing the user (response to "/me" API request) See: https://developers.facebook.com/docs/php/GraphObject/4.0.0

Deprecated

This function is deprecated. This hook is deprecated but has not been removed for backwards compatibility. Facebook changed their API in version 2.4 so that we have to explicitly list the fields that we want Facebook to return in the /me query (previously Facebook returned all user fields).

If you want to map Facebook fields to Drupal user fields, implement either hook_simple_fb_connect_registration or hook_simple_fb_connect_login and make call Facebook API for the desired field there. Example is provided in hook_simple_fb_connect_registration.

1 invocation of hook_simple_fb_connect_register_alter()
simple_fb_connect_create_user in ./simple_fb_connect.module
Creates a new user account for a Facebook user.

File

./simple_fb_connect.api.php, line 35
Hooks provided by the Simple FB Connect module.

Code

function hook_simple_fb_connect_register_alter(&$fields, $fb_user_profile) {

  // Implement this hook in your own module to modify $fields array.
}