Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tfa_basic
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
tfa_basic
Commits
6d15422a
Commit
6d15422a
authored
10 years ago
by
Ben Jeavons
Browse files
Options
Downloads
Patches
Plain Diff
Make overview a form for altering, fix for methods notice
parent
2fc1aa3c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tfa_basic.module
+2
-2
2 additions, 2 deletions
tfa_basic.module
tfa_basic.pages.inc
+4
-4
4 additions, 4 deletions
tfa_basic.pages.inc
with
6 additions
and
6 deletions
tfa_basic.module
+
2
−
2
View file @
6d15422a
...
...
@@ -36,8 +36,8 @@ function tfa_basic_menu() {
$items
[
'user/%user/security/tfa'
]
=
array
(
'title'
=>
'Security'
,
'page callback'
=>
'
tfa_basic_overview
'
,
'page arguments'
=>
array
(
1
),
'page callback'
=>
'
drupal_get_form
'
,
'page arguments'
=>
array
(
'tfa_basic_overview'
,
1
),
'access callback'
=>
'tfa_basic_setup_access'
,
'access arguments'
=>
array
(
1
,
'setup own tfa'
),
'type'
=>
MENU_LOCAL_TASK
,
...
...
This diff is collapsed.
Click to expand it.
tfa_basic.pages.inc
+
4
−
4
View file @
6d15422a
...
...
@@ -4,13 +4,13 @@
* @param $account
* @return string
*/
function
tfa_basic_overview
(
$account
)
{
function
tfa_basic_overview
(
$form
,
&
$form_state
,
$account
)
{
$output
[
'info'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
'<p>'
.
t
(
'Two-factor authentication (TFA) provides additional security for your account. With TFA enabled, you sign on to the site with a uniquely generated code in addition to your username and password.'
)
.
'</p>'
,
);
$form_state
[
'storage'
][
'account'
]
=
$account
;
$data
=
tfa_basic_get_tfa_data
(
$account
);
$enabled
=
isset
(
$data
[
'status'
])
&&
$data
[
'status'
]
?
TRUE
:
FALSE
;
...
...
@@ -108,7 +108,7 @@ function tfa_basic_overview($account) {
);
}
return
drupal_render
(
$output
)
;
return
$output
;
}
function
tfa_basic_disable_form
(
$form
,
&
$form_state
,
$account
)
{
...
...
@@ -294,7 +294,7 @@ function tfa_basic_setup_form($form, &$form_state, $account, $method = 'app_setu
break
;
}
// Provide skip button for optional TFA plugins.
if
(
count
(
$form_state
[
'storage'
][
'methods'
])
>
1
)
{
if
(
isset
(
$form_state
[
'storage'
][
'methods'
])
&&
count
(
$form_state
[
'storage'
][
'methods'
])
>
1
)
{
$form
[
'actions'
][
'skip'
]
=
array
(
'#type'
=>
'submit'
,
'#value'
=>
t
(
'Skip'
),
...
...
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
register
or
sign in
to comment