Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, Is it possible to allow anonymous users to write a new message only to users with a specific role? And if it's possible, how can I add a custom field to display in the "create new message" page only for anonymous users?
For example if the user is anonymous he should be able to write only to users that have the "support" role, but if an anonymous user wants to write a message to the support he must specify his e-mail address.
Thank you!
Comments
Comment #1
saurabh.dhariwal CreditAttribution: saurabh.dhariwal at AddWeb Solution Pvt. Ltd. commentedYou can set this configuration from Private message settings: admin/config/messaging/privatemsg/block
You require that anonymous user can send only message to support role this functionality can achieve with for alter with below code.
Hope this helps!
Thanks!
Comment #2
ivnish CreditAttribution: ivnish commented