Skip to content

Commit 0796c94

Browse files
committed
ISSUE-338: show default login
1 parent cefd873 commit 0796c94

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

public_html/lists/admin/index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ function mb_strtolower($string)
291291
}
292292
echo "$page_title</title>";
293293
$inRemoteCall = false;
294+
if ($page_title === 'enablelogin') {
295+
SaveConfig('hide_default_login', 0);
296+
header('Location: ?page=home');
297+
exit;
298+
}
294299
$doLoginCheck = Sql_Table_exists($tables['admin_login']);
295300

296301
if (!empty($GLOBALS['require_login'])) {

public_html/lists/admin/login.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ function footer()
4646
echo '</div></form>';
4747
}
4848

49+
function enableDefaultLogin()
50+
{
51+
echo '<div class="login"><p>';
52+
echo '<strong>' . $GLOBALS['I18N']->get('Having trouble with SSO login?') . '</strong><br>';
53+
echo $GLOBALS['I18N']->get('You can still use default login by clicking on the button') . ' ';
54+
echo '<a href="?page=enablelogin" class="submit">' . $GLOBALS['I18N']->get('Enable default login') . '</a>';
55+
echo '</p><div class="clear"></div></div>';
56+
}
57+
58+
4959
function renderSSO()
5060
{
5161
if (!empty($GLOBALS['ssoplugin'])) {
@@ -156,5 +166,9 @@ function deleteOldTokens()
156166
footer();
157167
}
158168
renderSSO();
169+
170+
if (!$showDefaultLogin) {
171+
enableDefaultLogin();
172+
}
159173
}
160174
?>

0 commit comments

Comments
 (0)