You are here

function twitter_user_make_global in Twitter 7.3

Same name and namespace in other branches
  1. 6.3 twitter.pages.inc \twitter_user_make_global()
  2. 6.4 twitter.pages.inc \twitter_user_make_global()
  3. 7.4 twitter.pages.inc \twitter_user_make_global()

@todo Please document this function.

See also

http://drupal.org/node/1354

1 string reference to 'twitter_user_make_global'
twitter_menu in ./twitter.module
Implements hook_menu().

File

./twitter.pages.inc, line 248
Page callbacks for Twitter module.

Code

function twitter_user_make_global($form, $form_state, $account, $twitter_uid) {
  module_load_include('inc', 'twitter');
  $twitter_account = twitter_account_load($twitter_uid);
  $form = array();
  $form['uid'] = array(
    '#type' => 'value',
    '#value' => $account->uid,
  );
  $form['twitter_uid'] = array(
    '#type' => 'value',
    '#value' => $twitter_uid,
  );
  if ($twitter_account->is_global) {
    $text = t('Are you sure you want to remove %screen_name from the global accounts?', array(
      '%screen_name' => $twitter_account->screen_name,
    ));
    $description = t('This means other users will no longer be allowed to post using this account.');
  }
  else {
    $text = t('Are you sure you want to allow other users to access the %screen_name account?', array(
      '%screen_name' => $twitter_account->screen_name,
    ));
    $description = t('This will allow other users to post using this account.');
  }
  return confirm_form($form, $text, 'user/' . $account->uid . '/edit/twitter', $description);
}