Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: iceman~ on April 07, 2008, 12:13:50 PM

Title: Hide email address SOLVED
Post by: iceman~ on April 07, 2008, 12:13:50 PM
Is it possible to hide email addresses from everyone but admin.
Title: Re: Hide email address
Post by: metallica48423 on April 07, 2008, 12:34:09 PM
In Admin > Security and Moderation, under the 'general' tab:

Do not reveal contact details of members to guests -- uncheck
Allow viewable email addresses. -- uncheck.

This will make SMF replace the email with the email system... emails wont actually be displayed but users would still be able to send emails to each other.

see our memberlist here for an example

If someone doesn't want to be emailed, they can uncheck "allow others to email you" in their account settings and that will remove it altogether
Title: Re: Hide email address
Post by: iceman~ on April 07, 2008, 02:33:59 PM
Thanks Metallica ... but what if you do not want members to see email id's at all.
They should just use the PM option and not be able to email at all, only admins can mail.
Then is there anyway for doing that ??
Sorry for all the trouble mate.
Thanks.
Title: Re: Hide email address
Post by: metallica48423 on April 07, 2008, 02:51:46 PM
I don't see a way to do it immediately... theres a few places that button exists.

I think the system should be able to be disabled though, personally.  I'll bring it up to the developers as a tweak and see what they think
Title: Re: Hide email address
Post by: iceman~ on April 07, 2008, 03:11:42 PM
Great Mate .... Thanks

For SMF 1.1.4 there is a mod called " View Email Permission " .. http://custom.simplemachines.org/mods/index.php?mod=1088

could this be used for SMF 2 ?

My apologies if i am troubling you a lot.

Thanks again Mate.
Title: Re: Hide email address
Post by: metallica48423 on April 07, 2008, 03:12:43 PM
It wont work.

The way permissions are defined and handled is different between SMF 2 and 1.1.4
Title: Re: Hide email address
Post by: iceman~ on April 07, 2008, 03:17:25 PM
Ok Mate ... Thanks for your efforts.
Title: Re: Hide email address
Post by: SleePy on April 13, 2008, 01:12:59 AM
iceman~,

you can change this by opening Security.php
Finding:
    return !empty($modSettings['guest_hideContacts']) && $user_info['is_guest'] ? 'no' : ((!$user_info['is_guest'] && $user_info['id'] == $userProfile_id && !$userProfile_hideEmail) || allowedTo('moderate_forum') ? 'yes_permission_override' : ($userProfile_hideEmail ? 'no' : (!empty($modSettings['make_email_viewable']) ? 'yes' : 'no_through_forum')));


replace:
    return allowedTo('moderate_forum') ? 'yes_permission_override' : 'no';

That should change it so only those who can moderate the forum can do this.
Title: Re: Hide email address
Post by: iceman~ on April 13, 2008, 02:27:46 AM
Just what i was looking for SleePy .... Thanks again mate.