aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_user.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 0c9412e38..3ba596633 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -301,10 +301,11 @@ SELECT
LEFT JOIN '.USER_CACHE_TABLE.' AS uc ON ui.user_id = uc.user_id
LEFT JOIN '.THEMES_TABLE.' AS t ON t.id = ui.theme
WHERE ui.user_id = \''.$user_id.'\'
+ GROUP BY ui.user_id
;';
$result = pwg_query($query);
$user_infos_row = pwg_db_fetch_assoc($result);
- if (0 == $user_infos_row['counter']) {
+ if (!isset($user_infos_row['counter']) or 0 == $user_infos_row['counter']) {
create_user_infos($user_id);
$result = pwg_query($query);