You are here

function twitter_user_delete in Twitter 6.3

Same name and namespace in other branches
  1. 6.2 twitter.inc \twitter_user_delete()
  2. 6.4 twitter.inc \twitter_user_delete()
  3. 7.6 twitter.module \twitter_user_delete()
  4. 7.3 twitter.module \twitter_user_delete()
  5. 7.4 twitter.module \twitter_user_delete()
  6. 7.5 twitter.module \twitter_user_delete()

Deletes a Twitter account

Removes entries from twitter_account and authmap tables

1 call to twitter_user_delete()
twitter_account_list_form_submit in ./twitter.pages.inc

File

./twitter.inc, line 126

Code

function twitter_user_delete($twitter_uid) {
  $account = twitter_account_load($twitter_uid);
  $sql = "DELETE FROM {twitter_account} WHERE twitter_uid = %d";
  db_query($sql, $twitter_uid);
  $sql = "DELETE FROM {twitter} WHERE screen_name = '%s'";
  db_query($sql, $account->screen_name);
  $sql = "DELETE FROM {authmap} WHERE authname = %d AND module = 'twitter'";
  db_query($sql, $twitter_uid);
}