I am a Drupal beginner. When users create their account, they have the option to have a personal contact form. Where do I go to disable that? It's not in permissions. It's not a bad option, but I know it will confuse the hell out of my site's users. It may even scare some away!
How do I disable the personal contact form option in the user edit form?
7.2k views Asked by Behrooz Karjoo AtThere are 8 answers
On
A personal contact form is not something you get by default in Drupal. There are modules that can do this, you have probably activated such a module. Check what modules you have activated at admin/build/settings.
If you want to disable this for regular users only you should instead check you permission settings.
On
Drupal 6:
If you want to have the site-wide contact form enabled, but not even display the option for a personal contact form to your users you must follow these steps:
Create a custom module
http://www.hankpalan.com/blog/drupal/make-custom-drupal-module
Add this code to your .module file:
function your_module_name_form_user_profile_form_alter(&$form, &$form_state) {
unset ($form['contact']);
}
On
Tested in Drupal 7.
Place the following in template.php of your theme. Change MYTHEME to your theme name.
function MYTHEME_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'user_profile_form') {
$form['contact']['#access'] = FALSE;
}
}
Notice that access is set to false, instead of being unset(), i.e. removed. That way we're not interfering with the flow of data.
On
Drupal 7
All answers NOT remove the section for personal contact option displayed (D7) at "user/%/edit"

For remove tab AND settings for Drupal 7:
/**
* Implements hook_form_alter().
*/
function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
if ('user_profile_form' === $form_id) {
$form['contact']['#access'] = FALSE;
}
}
/**
* Implements hook_preprocess_page().
*/
function MY_MODULE_preprocess_page(&$variables) {
$menu_items = menu_get_item();
if('user/%/edit' === $menu_items['path']){
$variables['page']['content']['content']['content']['system_main']['contact']['#access'] = FALSE;
}
}
After:

On
Use Contact permissions. It provides a permission:
"Have a personal contact form" which allows administrators to configure which roles get the ability to have a "Personal contact form".
Also the Simplify module has a separate option for that.
If you visit admin/build/contact/settings in Drupal 6 or 5 you can untick "Enable personal contact form by default"