aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Woody <a_jelly_doughnut@phpbb.com>2010-08-22 15:28:05 -0500
committerJosh Woody <a_jelly_doughnut@phpbb.com>2010-08-28 15:49:47 -0500
commit2a59e6d4864a993842167a40a9762702ad58db12 (patch)
treec15664f5546ecbc5ce64ad499b951c3a6bf98096
parent64e6faa877af36f256da12d122e296f45706d359 (diff)
downloadforums-2a59e6d4864a993842167a40a9762702ad58db12.tar
forums-2a59e6d4864a993842167a40a9762702ad58db12.tar.gz
forums-2a59e6d4864a993842167a40a9762702ad58db12.tar.bz2
forums-2a59e6d4864a993842167a40a9762702ad58db12.tar.xz
forums-2a59e6d4864a993842167a40a9762702ad58db12.zip
[ticket/9772] Unify permissions for sending email when board_email_form is off
Sending email via memberlist.php was limited to users having u_sendemail. When board_email_form is disabled, no such requirement was enforced. This is now changed. PHPBB3-9772
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/viewtopic.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 26968e1382..16700c490c 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -309,7 +309,7 @@ function get_user_information($user_id, $user_row)
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
- if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
+ if ((!empty($user_row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
{
$user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
}
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index b46230b10a..2fa2d11ee1 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1607,7 +1607,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
$rank_title = $rank_img = $rank_img_src = '';
get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
- if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_user'))
+ if ((!empty($data['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_user'))
{
$email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&amp;u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_user')) ? '' : 'mailto:' . $data['user_email']);
}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 8926d5a40b..498088c5c8 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1146,7 +1146,7 @@ while ($row = $db->sql_fetchrow($result))
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
- if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email'))
+ if ((!empty($row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
{
$user_cache[$poster_id]['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;u=$poster_id") : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
}