Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
a3978dcd
Commit
a3978dcd
authored
Oct 01, 2018
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Oct 01, 2018
Browse files
Merge "Bug 1770261: remove extra submit field in login form"
parents
3eec9dc0
52661cb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/users/changeuser.php
View file @
a3978dcd
...
...
@@ -15,7 +15,7 @@ define('NOCHECKREQUIREDFIELDS', 1);
require
(
dirname
(
dirname
(
dirname
(
__FILE__
)))
.
'/init.php'
);
require_once
(
'activity.php'
);
if
(
param_integer
(
'login_submitted'
,
0
))
{
if
(
isset
(
$_POST
[
'pieform_login'
]
))
{
redirect
(
get_config
(
'wwwroot'
));
}
...
...
htdocs/auth/lib.php
View file @
a3978dcd
...
...
@@ -1373,11 +1373,6 @@ function auth_draw_login_page($message=null, Pieform $form=null) {
function
auth_get_login_form
()
{
$elements
=
auth_get_login_form_elements
();
$elements
[
'login'
][
'elements'
][
'login_submitted'
]
=
array
(
'type'
=>
'hidden'
,
'value'
=>
1
);
// Change login redirection for clean urls
$url
=
get_relative_script_path
();
$getstart
=
strrpos
(
$url
,
'?'
);
...
...
@@ -1670,7 +1665,7 @@ class AuthFactory {
* @param array $values The submitted values
*/
function
login_validate
(
Pieform
$form
,
$values
)
{
if
(
!
empty
(
$values
[
'
login_submitted'
]))
{
if
(
isset
(
$values
[
'
pieform_login'
]))
{
// only set by $form->build()
if
(
empty
(
$values
[
'login_username'
])
||
empty
(
$values
[
'login_password'
]))
{
$form
->
set_error
(
null
,
get_string
(
'loginfailed'
));
}
...
...
htdocs/lib/pieforms/pieform.php
View file @
a3978dcd
...
...
@@ -590,8 +590,8 @@ class Pieform {/*{{{*/
}
else
{
global
$SESSION
;
// The login system comes past here twice so we need to pa
c
e first error message above form
if
(
!
empty
(
$values
[
'
login_submitted
'
]))
{
// The login system comes past here twice so we need to pa
st
e first error message above form
if
(
isset
(
$values
[
'
pieform_login
'
]))
{
$SESSION
->
add_error_msg
(
$this
->
get_property
(
'errormessage'
),
false
,
'loginbox'
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment