Topic: [Fixed: 1683] Guest email revealed...

As you probably noticed, if guest posting is enabled, guest email is being revealed in public... i think it's a bug, so here's a little fix:

// Generate author contact details
...
Line 411 (at least in my file):
if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
...

Change to:

// Generate author contact details
...
if ($forum_user['is_admmod']) // <-- add this line
if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
...

Re: [Fixed: 1683] Guest email revealed...

The other solution is to disable option that guest MUST enter his email to post...

In cache_config.php change 'p_force_guest_email' value to 0.

Re: [Fixed: 1683] Guest email revealed...

FlashT wrote:

As you probably noticed, if guest posting is enabled, guest email is being revealed in public... i think it's a bug, so here's a little fix:

// Generate author contact details
...
Line 411 (at least in my file):
if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
...

Change to:

// Generate author contact details
...
if ($forum_user['is_admmod']) // <-- add this line
if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
$forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
...

Thanks, I applied your fix in my punbb installation smile

Re: [Fixed: 1683] Guest email revealed...

Im think it`s not a bug.

Email is visible only if you turn on config option «User info in posts» — Show poster location, register date, post count, e-mail and URL in posts. Disable this option is hide email for guest too.

5

Re: [Fixed: 1683] Guest email revealed...

Fixed on Changeset #1683