File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,11 @@ function mb_strtolower($string)
291291}
292292echo "$ 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
296301if (!empty ($ GLOBALS ['require_login ' ])) {
Original file line number Diff line number Diff 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+
4959function 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?>
You can’t perform that action at this time.
0 commit comments