You are here

function drupagram_account_delete in Drupagram 6

Same name and namespace in other branches
  1. 7 drupagram.inc \drupagram_account_delete()

Delete a drupagram account and its statuses.

Parameters

$drupagram_id: An integer with the Instagram UID.

$username: Optional string with the user name.

1 call to drupagram_account_delete()
drupagram_account_list_form_submit in ./drupagram.pages.inc

File

./drupagram.inc, line 79
Instagram API functions

Code

function drupagram_account_delete($drupagram_id) {
  $account = drupagram_account_load($drupagram_id);
  db_query("DELETE FROM {drupagram_account} WHERE drupagram_id=%d", $drupagram_id);
  db_query("DELETE FROM {drupagram} WHERE username='%s'", $account->username);
  db_query("DELETE FROM {authmap} WHERE authname='%s' AND module='%s'", $drupagram_id, 'drupagram');
}