MyBB Community Forums

Full Version: Disabling sending private messages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I'm trying to solve what I hope is a straightforward problem.

When users disable receiving private messages, they retain the ability to send private messages. This strikes me as odd and it creates UX problems insofar as some members disable receiving messaging, forget, send someone else a message, and that person then isn't able to reply.

How do I modify the script to disable receiving AND sending as opposed to just receiving?

Thanks!
This is a surprisingly common occurrence and it's really frustrating to users. Can anyone shed light on this? It's silly to allow users to disable receiving PMs while still retaining the ability to send PMs.
If you believe the feature is simply not communicated properly, you can add a conditional warning in the private_send template (Private Messaging Templates):

<div id="receivepms-warning" class="pm_alert" data-receivepms="{$mybb->user['receivepms']}" hidden>
Warning: You may not be able to receive responses to sent messages (<a href="usercp.php?action=options">configure</a>).
</div>
<style>
#receivepms-warning[data-receivepms="0"] { display: revert; }
</style>
(2022-07-31, 02:56 PM)Devilshakerz Wrote: [ -> ]If you believe the feature is simply not communicated properly, you can add a conditional warning in the private_send template (Private Messaging Templates):

<div id="receivepms-warning" class="pm_alert" data-receivepms="{$mybb->user['receivepms']}" hidden>
Warning: You may not be able to receive responses to sent messages (<a href="usercp.php?action=options">configure</a>).
</div>
<style>
#receivepms-warning[data-receivepms="0"] { display: revert; }
</style>

Thanks for the help. I've gone a step further and removed the option to disable incoming messages within the CP temporarily.

I'm going to modify private_send to hide the page if $mybb->user['receivepms'] is set to 0 while directing them to enable it.