|
|
|
@ -4030,6 +4030,18 @@ function api_not_allowed( |
|
|
|
|
|
|
|
|
|
global $this_section; |
|
|
|
|
|
|
|
|
|
// Check if a custom file (login.tpl) exists for custompages included overrides |
|
|
|
|
if ((!isset($user_id) || api_is_anonymous()) && CustomPages::enabled()) { |
|
|
|
|
$customLoginTemplate = Template::findTemplateFilePath('custompage/login.tpl'); |
|
|
|
|
if (file_exists(api_get_path(SYS_TEMPLATE_PATH) . $customLoginTemplate)) { |
|
|
|
|
$tpl = new Template(null, false, false); |
|
|
|
|
$content = $tpl->fetch($customLoginTemplate); |
|
|
|
|
$tpl->assign('content', $content); |
|
|
|
|
$tpl->display_one_col_template(); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (CustomPages::enabled() && !isset($user_id)) { |
|
|
|
|
if (empty($user_id)) { |
|
|
|
|
// Why the CustomPages::enabled() need to be to set the request_uri |
|
|
|
|