Contact permissions
Categories
Component ID
1483814
Component name
Contact permissions
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
4946
Component created
Component changed
Component body
Provides further permissions to control how core's contact module behaves.
For now, only one permission is added: "Have a personal contact form" which allows administrators to configure which roles get the ability to have a "Personal contact form".
Suggestions as to what other permissions would be useful are welcome.
How to use it
Simply install it like any other module, and under 'admin/user/permissions', configure what roles should be able to 'Have a personal contact form'.
How it works
The module does two things to every role which does NOT have the permission assigned:
- Removes the option from its user edit page to activate his/her personal contact form, through hook_form_alter.
- Removes access from anyone to see his/her user/%uid/contact by taking over the access callback for those pages.
- Note that core's access callback is executed before our checks, and only if there is access granted by core, we run our checks.
Ported to Drupal 7 thanks to pcambra.
