Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
f1e0bce5
Commit
f1e0bce5
authored
Nov 29, 2016
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to the reset password page
parent
42f28b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
reset.php
qa-include/pages/reset.php
+5
-5
No files found.
qa-include/pages/reset.php
View file @
f1e0bce5
...
@@ -57,7 +57,7 @@ $errors = array();
...
@@ -57,7 +57,7 @@ $errors = array();
$fields
=
array
(
$fields
=
array
(
'email_handle'
=>
array
(
'email_handle'
=>
array
(
'type'
=>
'static'
,
'type'
=>
'static'
,
'label'
=>
qa_
opt
(
'allow_login_email_only'
)
?
qa_lang_html
(
'users/email_label'
)
:
qa_lang_html
(
'users/email_handle_label'
),
'label'
=>
qa_
lang_html
(
qa_opt
(
'allow_login_email_only'
)
?
'users/email_label'
:
'users/email_handle_label'
),
'value'
=>
qa_html
(
$emailHandle
),
'value'
=>
qa_html
(
$emailHandle
),
),
),
'code'
=>
array
(
'code'
=>
array
(
...
@@ -93,11 +93,11 @@ if (strlen($emailHandle) > 0) {
...
@@ -93,11 +93,11 @@ if (strlen($emailHandle) > 0) {
if
(
count
(
$matchingUsers
)
==
1
)
{
if
(
count
(
$matchingUsers
)
==
1
)
{
require_once
QA_INCLUDE_DIR
.
'db/selects.php'
;
require_once
QA_INCLUDE_DIR
.
'db/selects.php'
;
$userId
=
$matchingUsers
[
0
];
$userInfo
=
qa_db_select_with_pending
(
qa_db_user_account_selectspec
(
$userId
,
true
));
// strlen() check is vital otherwise we can reset code for most users by entering the empty string
// strlen() check is vital otherwise we can reset code for most users by entering the empty string
if
(
strlen
(
$code
)
>
0
)
{
if
(
strlen
(
$code
)
>
0
)
{
$userId
=
$matchingUsers
[
0
];
$userInfo
=
qa_db_select_with_pending
(
qa_db_user_account_selectspec
(
$userId
,
true
));
if
(
strtolower
(
trim
(
$userInfo
[
'emailcode'
]))
==
strtolower
(
$code
))
{
if
(
strtolower
(
trim
(
$userInfo
[
'emailcode'
]))
==
strtolower
(
$code
))
{
// User input a valid code so no need to ask for it but pass it to the next step
// User input a valid code so no need to ask for it but pass it to the next step
unset
(
$fields
[
'code'
]);
unset
(
$fields
[
'code'
]);
...
@@ -177,7 +177,7 @@ $qa_content['error'] = isset($errors['page']) ? $errors['page'] : null;
...
@@ -177,7 +177,7 @@ $qa_content['error'] = isset($errors['page']) ? $errors['page'] : null;
if
(
!
isset
(
$errors
[
'page'
]))
{
if
(
!
isset
(
$errors
[
'page'
]))
{
// Using this form action instead of qa_self_html() to get rid of the 's' (success) GET parameter from forgot.php
// Using this form action instead of qa_self_html() to get rid of the 's' (success) GET parameter from forgot.php
$qa_content
[
'form'
]
=
array
(
$qa_content
[
'form'
]
=
array
(
'tags'
=>
'method="post" action="'
.
qa_path
(
'reset'
)
.
'"'
,
'tags'
=>
'method="post" action="'
.
qa_path
_html
(
'reset'
)
.
'"'
,
'style'
=>
'tall'
,
'style'
=>
'tall'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment