contact_user

Versions
4.6 – 4.7
contact_user($type, $edit, &$user, $category = NULL)
5 – 6
contact_user($type, &$edit, &$user, $category = NULL)

Implementation of hook_user().

Provides signature customization for the user's comments.

Code

modules/contact.module, line 43

<?php
function contact_user($type, $edit, &$user, $category = NULL) {
  if ($type == 'form' && $category == 'account') {
    return array(array('title' => t('Contact settings'), 'data' => form_checkbox(t('Personal contact form'), 'contact', 1, $edit['contact'], t('Allow other users to contact you by e-mail via <a href="%url">your personal contact form</a>. Note that your e-mail address is not made public and that privileged users such as site administrators are able to contact you even if you choose not to enable this feature.', array('%url' => url("user/$user->uid/contact")))), 'weight' => 2));
  }
  if ($type == 'validate') {
    return array('contact' => $edit['contact']);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.