Disabling Guest Email Permission

Started by amkanojia, June 06, 2009, 01:26:16 PM

Previous topic - Next topic

amkanojia

Hello all,
I am using SMF 2.0 and would like to disable the ability for Guests to email users. Currently, Guests can email users that check the box in their profile for "Allow users to Email me."

I would like to change it to where registered users can email other users, but guests cannot. I have looked into guest permissions, and do not see a way to prevent them from emailing a registered user (who has allowed users to email him) without preventing guests from browsing the forum.

Basically, the only way I can think of doing it is to disable forum browsing for all guests, which I don't want to do.

Forgive my ignorance if there is some simple answer to doing this, I haven't been able to figure one out.

Thank you very much for taking the time to read my problem and help me with it (if possible).

-Alok

Kermit

Firstly restrict the guests via permissions to see users profiles and after that

in Display.template.php

Code (find) Select

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
echo '


Code (replace with) Select

// Don't show the email address if they want it hidden.
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && $context['user']['is_logged'])
echo '



After that guest won't be able to see the email icon on the posts,so they won't be able to send emails as well
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein


Advertisement: