You are here

function twitter_user_make_global_submit in Twitter 7.4

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

Form submit handler for setting a Twitter account as global.

File

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

Code

function twitter_user_make_global_submit($form, &$form_state) {
  db_update('twitter_account')
    ->expression('is_global', '(1 - is_global)')
    ->condition('twitter_uid', $form_state['values']['twitter_uid'])
    ->execute();
  $form_state['redirect'] = 'user/' . $form_state['values']['uid'] . '/edit/twitter';
}