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
Xavier Bachelot
lemonldap-ng
Commits
e6425fc7
Commit
e6425fc7
authored
Dec 04, 2009
by
Clément OUDOT
Browse files
Do not display login form if there is an external authentication error
parent
0cf5c8ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/lemonldap-ng-portal/example/index_skin.pl
View file @
e6425fc7
...
...
@@ -221,13 +221,16 @@ else {
filter
=>
sub
{
$portal
->
translate_template
(
@
_
)
}
);
$template
->
param
(
AUTH_ERROR
=>
$portal
->
error
);
$template
->
param
(
AUTH_ERROR_TYPE
=>
$portal
->
error_type
);
$template
->
param
(
AUTH_URL
=>
$portal
->
get_url
);
$template
->
param
(
LOGIN
=>
$portal
->
get_user
);
$template
->
param
(
AUTOCOMPLETE
=>
$portal
->
{
portalAutocomplete
}
);
$template
->
param
(
SKIN
=>
$skin
);
$template
->
param
(
AUTH_ERROR
=>
$portal
->
error
);
$template
->
param
(
AUTH_ERROR_TYPE
=>
$portal
->
error_type
);
$template
->
param
(
AUTH_URL
=>
$portal
->
get_url
);
$template
->
param
(
LOGIN
=>
$portal
->
get_user
);
$template
->
param
(
AUTOCOMPLETE
=>
$portal
->
{
portalAutocomplete
}
);
$template
->
param
(
SKIN
=>
$skin
);
$template
->
param
(
DISPLAY_RESETPASSWORD
=>
$portal
->
{
portalDisplayResetPassword
}
);
$template
->
param
(
DISPLAY_FORM
=>
1
);
# Adapt template if password policy error
if
(
$portal
->
{
portalDisplayChangePassword
}
and
(
$portal
->
{
error
}
==
PE_PP_CHANGE_AFTER_RESET
...
...
@@ -240,12 +243,21 @@ else {
or
$portal
->
{
error
}
==
PE_BADOLDPASSWORD
)
)
{
$template
->
param
(
REQUIRE_OLDPASSWORD
=>
1
);
$template
->
param
(
DISPLAY_PASSWORD
=>
1
);
$template
->
param
(
REQUIRE_OLDPASSWORD
=>
1
);
$template
->
param
(
DISPLAY_PASSWORD
=>
1
);
$template
->
param
(
DISPLAY_RESETPASSWORD
=>
0
);
$template
->
param
(
DISPLAY_FORM
=>
0
);
}
else
{
$template
->
param
(
DISPLAY_FORM
=>
1
);
$template
->
param
(
DISPLAY_RESETPASSWORD
=>
$portal
->
{
portalDisplayResetPassword
}
);
# Adapt template if external authentication error
if
(
$portal
->
{
error
}
==
PE_BADCERTIFICATE
or
$portal
->
{
error
}
==
PE_CERTIFICATEREQUIRED
or
$portal
->
{
error
}
==
PE_ERROR
)
{
$template
->
param
(
DISPLAY_RESETPASSWORD
=>
0
);
$template
->
param
(
DISPLAY_FORM
=>
0
);
}
print
$portal
->
header
('
text/html; charset=utf-8
');
...
...
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