function gauth_account_delete in Google Auth 7
Same name and namespace in other branches
- 7.2 gauth.module \gauth_account_delete()
Delete an account.
Parameters
string $account_id: Name or id of the account to be deleted
bool $by_name: Set False if passing account id and True for account name
3 calls to gauth_account_delete()
- gauth_account_delete_form_submit in ./
gauth.admin.inc - Submit handler to delete an google auth account.
- gauth_user_delete in ./
gauth.module - Implements hook_user_delete().
- gauth_user_services_user_account_delete_submit in gauth_user/
gauth_user.pages.inc - Delete account form submit handler.
File
- ./
gauth.module, line 478 - Google Auth Api for drupal.
Code
function gauth_account_delete($account_id, $by_name = TRUE) {
if ($by_name) {
$filter = 'name';
}
else {
$filter = 'id';
}
// Let other modules perform delete for associated data if any.
module_invoke_all('gauth_account_delete', gauth_account_load($account_id, $by_name));
return db_delete("gauth_accounts")
->condition($filter, $account_id, '=')
->execute();
}