Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tfa
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
tfa
Commits
7d73cf5f
Commit
7d73cf5f
authored
Sep 5, 2014
by
Ben Jeavons
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2327445
: Support context get altering.
parent
261db207
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tfa.module
+5
-2
5 additions, 2 deletions
tfa.module
with
5 additions
and
2 deletions
tfa.module
+
5
−
2
View file @
7d73cf5f
...
@@ -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
;
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment