You are here

function twitter_cache_account in Twitter 6.2

Saves Twitter account information to the database.

Parameters

$twitter_account: A Twitter user account in array form.

See also

twitter_touch_account()

twitter_cache_status()

3 calls to twitter_cache_account()
twitter_cron in ./twitter.module
Implementation of hook_cron()
twitter_fetch_account_info in ./twitter.inc
Fetch the full information for a Twitter.com account.
twitter_user_save in ./twitter.inc

File

./twitter.inc, line 373
A wrapper API for the Twitter microblogging service.

Code

function twitter_cache_account($twitter_account = array()) {

  // convert boolean into int since it doesn't appear to be
  // handled correctly otherwise
  if ($twitter_account['protected']) {
    $twitter_account['protected'] = 1;
  }
  else {
    $twitter_account['protected'] = 0;
  }
  db_query("DELETE FROM {twitter_account} WHERE twitter_uid = %n", $twitter_account['twitter_uid']);
  drupal_write_record('twitter_account', $twitter_account);
}