function tfa_set_context in Two-factor Authentication (TFA) 7.2
Set context for account's TFA process.
Parameters
object $account: User account.
array $context: TFA context.
See also
4 calls to tfa_set_context()
- tfa_form_submit in ./
tfa.form.inc - TFA form submission handler.
- tfa_login_submit in ./
tfa.module - Login submit handler to determine if TFA process is applicable.
- tfa_start_context in ./
tfa.module - Start context for TFA.
- tfa_user_login in ./
tfa.module - Implements hook_user_login().
File
- ./
tfa.module, line 66 - Two-factor authentication for Drupal.
Code
function tfa_set_context($account, array $context) {
$_SESSION['tfa'][$account->uid] = $context;
$_SESSION['tfa'][$account->uid]['uid'] = $account->uid;
// Clear existing static TFA process.
drupal_static_reset('tfa_get_process');
}