You are here

function _fb_user_set_authmap in Drupal for Facebook 6.2

Helper function to keep the authmap table in sync.

2 calls to _fb_user_set_authmap()
fb_connect_session_start_cb in ./fb_connect.module
Session start callback.
fb_user_fb in ./fb_user.module
Implementation of hook_fb.
1 string reference to '_fb_user_set_authmap'
fb_connect_session_start_cb in ./fb_connect.module
Session start callback.

File

./fb_user.module, line 648
This module manages relations between local Drupal user accounts and their accounts on facebook.com.

Code

function _fb_user_set_authmap($fb_app, $fbu, $account) {
  $fb_user_data = _fb_user_get_config($fb_app);
  if ($fb_user_data['map_account'] == FB_USER_OPTION_MAP_ALWAYS && $fbu && $account->uid != 0 && $account->uid != $fb_user_data['logged_in_uid']) {
    list($module, $authname) = _fb_user_get_authmap($fb_app, $fbu);
    user_set_authmaps($account, array(
      $module => $authname,
    ));
    if (fb_verbose()) {
      watchdog('fb_user', 'Using authmap to associate user !user with facebook user id %fbu.', array(
        '!user' => l($account->name, 'user/' . $account->uid),
        '%fbu' => $fbu,
      ));
    }
  }
}