Monday, October 06, 2008

Disable the Drupal User Contact Form

The best way I've found to disable the user "contact form", is to hook_menu_alter and remove the 'contact' fieldset from the user profile form itself.


function modulename_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'user_profile_form':
unset($form['contact']);
break;
...

No comments: