Add permission to *have* a personal contact form

Created on 4 May 2008, about 17 years ago
Updated 17 May 2025, 1 day ago

For my website I really have no need for the personal contact form. I saw the patch that allowed the access of the personal contact form to be set, but in that case, I don't want the other users to even see the 'Contact settings' in the user edit form. I'm sure there are many sites using Drupal that aren't actually community sites, so only a manager role or administrator role should be able to contact any users. The 'Contact settings' might just confuse these regular users and even make them think random people on the site might be contacting them. A way to turn off whether regular users can see this or not would be great.

Temporarily I've just changed the following in the contact_user function:

From -

if ($type == 'form' && $category == 'account') {

To -

if ($type == 'form' && $category == 'account' && user_access('access personal contact forms')) {

This works for my plans, but I thought I'd see if anyone else would need this feature and how it would best work for them. It is probably better to seperate this from the 'access personal contact forms', but this was just a quick fix for myself for now.

Cheers,
Steph

Feature request
Status

Postponed

Version

11.0 🔥

Component

contact.module

Created by

🇦🇺Australia ssherriff

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024