You are here

function gauth_user_services_delete in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth_user/gauth_user.module \gauth_user_services_delete()

Delete an service 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

1 call to gauth_user_services_delete()
gauth_user_services_delete_form_submit in gauth_user/gauth_user.admin.inc
Submit handler to delete an google auth services account.

File

gauth_user/gauth_user.module, line 253
Google Auth Api for drupal.

Code

function gauth_user_services_delete($account_id, $by_name = TRUE) {
  if ($by_name) {
    $filter = 'name';
  }
  else {
    $filter = 'id';
  }
  return db_delete("gauth_user_services")
    ->condition($filter, $account_id, '=')
    ->execute();
}