You are here

function twitter_load_accounts in Twitter 7.5

Same name and namespace in other branches
  1. 6.5 twitter.inc \twitter_load_accounts()
  2. 7.6 twitter.inc \twitter_load_accounts()

Loads all Twitter accounts added by a Drupal user.

This excludes Twitter accounts added automatically when e.g. pulling mentions of an account from the Twitter API.

Return value

array A list of TwitterUser objects.

3 calls to twitter_load_accounts()
twitter_load_account_names in ./twitter.inc
Bare list of all account names, keyed by Twitter ID.
twitter_load_authenticated_accounts in ./twitter.inc
Returns a list of authenticated global or user-specific Twitter accounts.
twitter_user_settings in ./twitter.pages.inc
Form builder that lists Twitter accounts.

File

./twitter.inc, line 136

Code

function twitter_load_accounts() {
  $accounts = array();
  $result = db_query('SELECT twitter_uid
    FROM {twitter_account}
    WHERE uid <> 0
    ORDER BY screen_name');
  foreach ($result as $account) {
    $accounts[] = twitter_account_load($account->twitter_uid);
  }
  return $accounts;
}