You are here

function twitter_load_accounts in Twitter 6.5

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

Loads all Twitter accounts added by a user.

Return value

array of TwitterUser objects.

2 calls to twitter_load_accounts()
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 133

Code

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