Skip to content
Snippets Groups Projects
Commit 7d73cf5f authored by Ben Jeavons's avatar Ben Jeavons
Browse files

Issue #2327445: Support context get altering.

parent 261db207
Branches
Tags
No related merge requests found
...@@ -78,10 +78,13 @@ function tfa_set_context($account, $context) { ...@@ -78,10 +78,13 @@ function tfa_set_context($account, $context) {
* @see tfa_start_context() for format * @see tfa_start_context() for format
*/ */
function tfa_get_context($account) { function tfa_get_context($account) {
$context = array();
if (isset($_SESSION['tfa'][$account->uid])) { if (isset($_SESSION['tfa'][$account->uid])) {
return $_SESSION['tfa'][$account->uid]; $context = $_SESSION['tfa'][$account->uid];
} }
return array(); // Allow other modules to modify TFA context.
drupal_alter('tfa_context', $context);
return $context;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment