HOW TO: Limit messaging rights of certain roles

Last updated on
30 April 2025

There are sometimes situations where a site administrator may want to limit the messaging abilities of certain roles. For instance, a site that is used by a school as a digital classroom may want to have full back-and-forth private messaging between the teacher and any student but NOT want the students to message each other. (Why? Experience shows that visible communication between students in grades 4-12 fosters civility and discourages sarcasm and harshness. Additionally, it could be distracting to the purpose of the site.)

Accomplishing this is simple, though a little counter-intuitive: You block a particular role from sending messages to that role. Note that you need to enable the module 'Block user messages' for this to work.

In this case, we have two primary roles on the site: "teacher" and "student." (If you haven't created these roles, go to Administer>>User management>>Roles to create the roles you need.)

  • Go to Administer>>Site configuration>>Private Messages>>User blocking rules
  • Click "Add new rule"
  • You will see four category headers with selection or check boxes underneath. Here should be your selections:
      "If the author has the role" Select: "student"
      "And the recipient has the role" Select: "student"
      "Action" Select: "Disallow sending message"
      "Enabled" Check the box
      Press the "Save configuration" button

You have now prevented a role, in this case "student", from sending messages to another user with the student role. When a "student" user tries to send a message, he/she receives a message saying such action is prohibited. However, a "student" user can still send a message to or reply to a message from a user with the "teacher" role.

Help improve this page

Page status: Not set

You can: