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!
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.
If you visit admin/build/contact/settings in Drupal 6 or 5 you can untick "Enable personal contact form by default"
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With