News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Allow Members to Send PM's While Muted

Started by Corelogik, December 07, 2010, 06:39:53 PM

Previous topic - Next topic

Corelogik

I need to allow members who are muted using the warning system to send PM's. Where would I set this or which file would I have to edit to make this possible? I have looked at several files in the sources directory and can't seem to find the appropriate one.

Illori

i dont know the exact code related to the mute from the warning system, but your change would be applied to this part of the code


$pm_areas = array(
'folders' => array(
'title' => $txt['pm_messages'],
'areas' => array(
'send' => array(
'label' => $txt['new_message'],
'custom_url' => $scripturl . '?action=pm;sa=send',
'permission' => allowedTo('pm_send'),


found in Sources/PersonalMessage.php

Corelogik

#2
I think I found what I was looking for, Security.php

elseif (isset($_SESSION['ban']['cannot_post']) || (!empty($modSettings['warning_mute']) && $modSettings['warning_mute'] <= $user_info['warning']))
{
$denied_permissions = array(
// Removed so muted people can send PM's. 'pm_send',
'calendar_post', 'calendar_edit_own', 'calendar_edit_any',
'poll_post',
'poll_add_own', 'poll_add_any',
'poll_edit_own', 'poll_edit_any',
'poll_lock_own', 'poll_lock_any',
'poll_remove_own', 'poll_remove_any',
'manage_attachments', 'manage_smileys', 'manage_boards', 'admin_forum', 'manage_permissions',
'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news',
'profile_identity_any', 'profile_extra_any', 'profile_title_any',
'post_new', 'post_reply_own', 'post_reply_any',
'delete_own', 'delete_any', 'delete_replies',
'make_sticky',
'merge_any', 'split_any',
'modify_own', 'modify_any', 'modify_replies',
'move_any',
'send_topic',
'lock_own', 'lock_any',
'remove_own', 'remove_any',
'post_unapproved_topics', 'post_unapproved_replies_own', 'post_unapproved_replies_any',
);
$user_info['permissions'] = array_diff($user_info['permissions'], $denied_permissions);
}


Banned users are still not allowed as they cannot log in to get to their messages. Sometimes muted people need to communicate with staff to sort out whatever issue it was that got them muted. Maybe not for all boards, but for mine at least, this is needed.

Maybe the dev's can consider putting in a permissions list or something for auto-muted members?


Advertisement: