File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4030,6 +4030,18 @@ function api_not_allowed(
40304030
40314031 global $ this_section ;
40324032
4033+ // Check if a custom file (login.tpl) exists for custompages included overrides
4034+ if ((!isset ($ user_id ) || api_is_anonymous ()) && CustomPages::enabled ()) {
4035+ $ customLoginTemplate = Template::findTemplateFilePath ('custompage/login.tpl ' );
4036+ if (file_exists (api_get_path (SYS_TEMPLATE_PATH ) . $ customLoginTemplate )) {
4037+ $ tpl = new Template (null , false , false );
4038+ $ content = $ tpl ->fetch ($ customLoginTemplate );
4039+ $ tpl ->assign ('content ' , $ content );
4040+ $ tpl ->display_one_col_template ();
4041+ exit ;
4042+ }
4043+ }
4044+
40334045 if (CustomPages::enabled () && !isset ($ user_id )) {
40344046 if (empty ($ user_id )) {
40354047 // Why the CustomPages::enabled() need to be to set the request_uri
You can’t perform that action at this time.
0 commit comments