You are here

function fbconnect_login_prompt_page in Facebook Connect 8.2

Same name and namespace in other branches
  1. 7.2 fbconnect_login/fbconnect_login.pages.inc \fbconnect_login_prompt_page()

Menu callback. Called when user perform Facebook registration

1 string reference to 'fbconnect_login_prompt_page'
fbconnect_login_menu in fbconnect_login/fbconnect_login.module
Implements hook_menu().

File

fbconnect_login/fbconnect_login.pages.inc, line 12
User pages callbacks for the fbconnect module.

Code

function fbconnect_login_prompt_page() {
  $conf = fbconnect_get_config();
  $params = array(
    '!site_name' => $conf['invite_name'],
  );
  $reg_msg = t('Log in to !site_name with Facebook account', $params);
  $link_msg = t('Click here to connect your existing !site_name account with Facebook', $params);
  $reg_attr = array();
  if ($conf['fast_reg_mode']) {
    $reg_attr = array(
      'attributes' => array(
        'onclick' => 'Drupal.fbconnect.DoFastRegistration(this); return false;',
      ),
    );
  }
  $items = array(
    'items' => array(
      l($reg_msg, 'fbconnect/authorize', $reg_attr),
      l($link_msg, 'user', array(
        'query' => array(
          'destination' => 'fbconnect/link',
        ),
      )),
    ),
  );
  return theme('item_list', $items);
}