News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Cannot stop restricted group emailing others from memberlist

Started by OCJ, March 06, 2011, 07:00:37 AM

Previous topic - Next topic

OCJ

I'm trying to set up a group (default new member group) with limited permissions until they upgrade their account - subscription being the main option.
Restricting access to forums is easy enough.
I tried all kinds of  permission setting and nothing works - other member's email icons are visible on the memberlist and anyone registered can email people.
Even denying sending forum emails for the restricted group and regular member group did not hide the email icon, and the emails are being sent.

The only option so far is hide the members list ... not ideal.


This is also the same from a forum page where the topic posters details are shown along with the email icon link - it sends from there too.

Is there a simple (procedure and) set of member group permissions to do this?

I need a registered account member group that is the same as a guest but can only access/edit their own profile. I do not want people to register then log in and start emailing other members ... spam, ex-members, commercial emails et etc.


Andy


Illori

I am assuming what you want can be done with a permission on the email address, if you can view it or not.  WARNING the follow will not apply to the profile view, so users that can view the profile will be able to email people still, if someone wants to try to fix this further they are welcome to post the fix.


themes/default/Display.template.php
Code (find) Select
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))

Code (replace) Select
if (in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')) && allowedTo('view_email'))

Sources/ManagePermissions.php
Code (find) Select
'profile_remove' => array(true, 'profile', 'delete_account', 'moderate_general'),
Code (add after) Select
'view_email' => array(false, 'profile', 'view_basic_info', 'view_basic_info'),

themes/default/languages/ManagePermissions.english.php
Code (find) Select
?>
Code (add before) Select
$txt['permissionname_view_email'] = 'View email address';
$txt['permissionname_simple_email'] = 'View email address';


enable this permission in the admin panel for each group you want to be able to view the email address in the post display.

OCJ

Thanks, I will try this tomorrow (4am). I've tried everything I can think of using permissions but cannot restrict viewing the email icon on the memberlist and posting emails from it.

So far the only way is to switch off the permission to view the memberlist when the restricted group member logs in. They can see it when logged out but then there is no email link. Not idea but its functional for me.
Andy

Advertisement: