You are here

function theme_fboauth_user_form_connect in Facebook OAuth (FBOAuth) 7.2

Same name and namespace in other branches
  1. 6 fboauth.module \theme_fboauth_user_form_connect()
  2. 7 fboauth.module \theme_fboauth_user_form_connect()

Display the Facebook Connect options on a user's profile form.

1 theme call to theme_fboauth_user_form_connect()
fboauth_form_user_profile_form_alter in ./fboauth.module
Implements hook_form_FORM_ID_alter().

File

./fboauth.module, line 504

Code

function theme_fboauth_user_form_connect($variables) {
  $uid = $variables['uid'];
  $fbid = $variables['fbid'];
  if ($fbid) {
    $output = t('Your account is connected with Facebook. (<a href="!url">More info</a>)', array(
      '!url' => url('user/' . $uid . '/fboauth', array(
        'query' => drupal_get_destination(),
      )),
    ));
  }
  else {
    $output = fboauth_action_display('connect', $_GET['q']);
    $output .= '<div class="description">' . t('Connect with Facebook to login with your Facebook account instead of a password.') . '</div>';
  }
  return $output;
}