function twitter_account_save in Twitter 7.6
Same name and namespace in other branches
- 6.5 twitter.inc \twitter_account_save()
- 6.3 twitter.inc \twitter_account_save()
- 6.4 twitter.inc \twitter_account_save()
- 7.3 twitter.inc \twitter_account_save()
- 7.4 twitter.inc \twitter_account_save()
- 7.5 twitter.inc \twitter_account_save()
Saves a twitter account.
Parameters
object $twitter_account: A TwitterAccount instance.
7 calls to twitter_account_save()
- twitter_account_list_form_submit in ./
twitter.pages.inc - Form submit handler for altering the list of Twitter accounts.
- twitter_cron in ./
twitter.module - Implements hook_cron().
- twitter_fetch_mentions_timeline in ./
twitter.inc - Fetches user's mentions of an authenticated account.
- twitter_fetch_user_timeline in ./
twitter.inc - Fetches a user's timeline.
- twitter_non_auth_account_form_submit in ./
twitter.pages.inc - Submit form handler to add a non-authenticated Twitter account.
File
- ./
twitter.inc, line 374
Code
function twitter_account_save($twitter_account) {
$twitter_account_db = entity_load_single('twitter_account', $twitter_account->twitter_uid);
// Check whether this account exists and load its defaults prior to save.
$twitter_account->is_new = $twitter_account_db ? FALSE : TRUE;
if ($twitter_account_db) {
$twitter_account = (object) array_merge((array) $twitter_account_db, (array) $twitter_account);
}
entity_save('twitter_account', $twitter_account);
}