You are here

function tfa_login_hash in Two-factor Authentication (TFA) 7

Same name and namespace in other branches
  1. 6 tfa.module \tfa_login_hash()
  2. 7.2 tfa.module \tfa_login_hash()

Generate a hash for this account for the TFA login form.

Parameters

object $account User account.:

Return value

string Random hash.

2 calls to tfa_login_hash()
tfa_entry_access in ./tfa.module
Validate access to TFA code entry form.
tfa_tfa_process in ./tfa.module
Send the code and redirect to entry form.

File

./tfa.module, line 203
Two-factor authentication for Drupal.

Code

function tfa_login_hash($account) {
  $data = implode(':', array(
    $account->name,
    $account->pass,
    $account->login,
  ));
  return drupal_hash_base64($data);
}