You are here

function gauth_account_authenticate in Google Auth 7

Same name and namespace in other branches
  1. 7.2 gauth.module \gauth_account_authenticate()

Authenticate a google account.

Parameters

string $account_id: Name or id of the account which will be used to create google client

bool $by_name: Set False if passing account id and True for account name

3 calls to gauth_account_authenticate()
gauth_account_edit_form_submit in ./gauth.admin.inc
Submit handler for adding a new account to google auth accounts.
gauth_client_get in ./gauth.module
Get Google_client object of an account.
gauth_user_services_user_account_create in gauth_user/gauth_user.pages.inc
Function creates a service account of the specified type.

File

./gauth.module, line 576
Google Auth Api for drupal.

Code

function gauth_account_authenticate($account_id, $by_name) {
  if ($by_name) {
    $account = gauth_account_load($account_id, $by_name);
    gauth_response_handler($account['id']);
  }
  else {
    gauth_response_handler($account_id);
  }
}