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