From 27e75c39cfa82fee6fcd23dcdbcb692905df9d65 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 30 Apr 2020 11:34:55 +0200 Subject: [PATCH] (cp 40182f7) fixes #1120 check installed theme on its identifier (=directory name), not on its display name --- include/functions_user.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 932b5d362..ab9633cb9 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -298,8 +298,10 @@ function build_user($user_id, $use_cache=true) $user['internal_status']['guest_must_be_guest'] = true; } - // Check user theme - if (!isset($user['theme_name']) || !check_theme_installed($user['theme_name'])) + // Check user theme. 2 possible problems: + // 1. the user_infos.theme was not found in the themes table, thus themes.name is null + // 2. the theme is not really installed on the filesystem + if (!isset($user['theme_name']) or !check_theme_installed($user['theme'])) { $user['theme'] = get_default_theme(); $user['theme_name'] = $user['theme'];