User: Add custom login template support for session expiration page - refs BT#22335

pull/6021/head
Christian Beeznest 8 months ago
parent 580b90ac6f
commit b7accd6d69
  1. 12
      main/inc/lib/api.lib.php

@ -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

Loading…
Cancel
Save