(cp 40182f7) fixes #1120 check installed theme on its identifier (=directory name), not on its display name

This commit is contained in:
plegall
2020-04-30 11:34:55 +02:00
parent ed487e4b24
commit 27e75c39cf

View File

@@ -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'];