function twitter_account_delete in Twitter 7.4
Same name and namespace in other branches
- 6.5 twitter.inc \twitter_account_delete()
- 7.6 twitter.inc \twitter_account_delete()
- 7.3 twitter.inc \twitter_account_delete()
- 7.5 twitter.inc \twitter_account_delete()
Delete a twitter account and its statuses.
Parameters
$twitter_uid: An integer with the Twitter UID.
2 calls to twitter_account_delete()
- twitter_account_list_form_submit in ./
twitter.pages.inc - Form submit handler for altering the list of Twitter accounts.
- twitter_user_delete in ./
twitter.module - Implements hook_user_delete().
File
- ./
twitter.inc, line 177
Code
function twitter_account_delete($twitter_uid) {
$account = twitter_account_load($twitter_uid);
// Delete from {twitter_account}.
$query = db_delete('twitter_account');
$query
->condition('twitter_uid', $twitter_uid);
$query
->execute();
// Delete from {twitter}.
$query = db_delete('twitter');
$query
->condition('screen_name', $account->screen_name);
$query
->execute();
// Delete from {authmap}.
$query = db_delete('authmap');
$query
->condition('authname', $twitter_uid);
$query
->condition('module', 'twitter');
$query
->execute();
}