aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-05-06 15:31:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-05-06 15:31:39 +0000
commit6205be1e746dd51dface756fbeb8b7fc702e1d80 (patch)
tree5f6fc8a6fa8bc8f13d5511a3f8ac4bb148d60b5e /phpBB/includes/functions.php
parent1e74ea85c5eebf9de7d29b1816ed5f8d9a02d638 (diff)
downloadforums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar
forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.gz
forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.bz2
forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.tar.xz
forums-6205be1e746dd51dface756fbeb8b7fc702e1d80.zip
#9828, #10545, #10541, #10533, #10529, #10527, #10521, #10503, #10481
- more label fixes - simpler approach to get input cursor text git-svn-id: file:///svn/phpbb/trunk@7485 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index aae147af4f..78a9983b0f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3355,7 +3355,7 @@ function truncate_string($string, $max_length = 60, $allow_reply = true, $append
*/
function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
- global $phpbb_root_path, $phpEx, $user;
+ global $phpbb_root_path, $phpEx, $user, $auth;
$profile_url = '';
$username_colour = ($username_colour) ? '#' . $username_colour : '';
@@ -3372,8 +3372,17 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
// Only show the link if not anonymous
if ($user_id && $user_id != ANONYMOUS)
{
- $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
- $profile_url .= '&amp;u=' . (int) $user_id;
+ // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly).
+ // For all others the link leads to a login page or the profile.
+ if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
+ {
+ $profile_url = '';
+ }
+ else
+ {
+ $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
+ $profile_url .= '&amp;u=' . (int) $user_id;
+ }
}
else
{