From 8eb9ce50b08a9905c449109edcde98c8a4d108e0 Mon Sep 17 00:00:00 2001 From: Zoddo Date: Sat, 10 Oct 2015 16:26:11 +0200 Subject: [PATCH] [ticket/14200] Allow hidden users to see himself on viewonline PHPBB3-14200 --- phpBB/includes/functions.php | 2 +- phpBB/viewonline.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 80d6e22bb7..4fb2da7a72 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4299,7 +4299,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum' $row['username'] = '' . $row['username'] . ''; } - if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline')) + if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id']) { $user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']); } diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 583e297682..87848f4485 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -187,7 +187,7 @@ while ($row = $db->sql_fetchrow($result)) if (!$row['session_viewonline']) { - $view_online = ($auth->acl_get('u_viewonline')) ? true : false; + $view_online = ($auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id']) ? true : false; $logged_hidden_online++; $username_full = '' . $username_full . '';