function twitter_user in Twitter 6.5
Same name and namespace in other branches
- 5 twitter.module \twitter_user()
 - 6.2 twitter.module \twitter_user()
 - 6.3 twitter.module \twitter_user()
 - 6.4 twitter.module \twitter_user()
 
Implements hook_user().
3 string references to 'twitter_user'
- twitter_update_6001 in ./
twitter.install  - Adding a handful of additional flags on accounts, and saving more metadata when Twitter sends it to us.
 - twitter_update_6004 in ./
twitter.install  - Add NOT NULL constraint and DEFAULT value to the screen_name field of the twitter and twitter_user tables per updated schema definition.
 - twitter_update_6300 in ./
twitter.install  - Update from 2.x to 3.x
 
File
- ./
twitter.module, line 474  - Provides API integration with the Twitter microblogging service.
 
Code
function twitter_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'load':
      $account->twitter_accounts = module_invoke_all('twitter_accounts', $account);
      break;
    case 'delete':
      foreach ($account->twitter_accounts as $twitter_account) {
        twitter_account_delete($twitter_account->id);
      }
      break;
    case 'view':
      if (!empty($account->twitter_accounts)) {
        $account->content['summary']['twitter'] = array(
          '#title' => t('Twitter accounts'),
          '#type' => 'user_profile_item',
          '#weight' => 10,
          '#value' => theme('twitter_user_accounts', $account->twitter_accounts),
        );
      }
      break;
  }
}