contact_user

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/contact/contact.module, строка 140

Версии
5 – 6
contact_user($type, &$edit, &$user, $category = NULL)

Реализация hook_user().

Allows the user the option of enabling/disabling his personal contact form.

Код

<?php
function contact_user($type, &$edit, &$user, $category = NULL) {
  if ($type == 'form' && $category == 'account') {
    $form['contact'] = array('#type' => 'fieldset',
      '#title' => t('Contact settings'),
      '#weight' => 5,
      '#collapsible' => TRUE,
    );
    $form['contact']['contact'] = array('#type' => 'checkbox',
      '#title' => t('Personal contact form'),
      '#default_value' => !empty($edit['contact']) ? $edit['contact'] : FALSE,
      '#description' => t('Allow other users to contact you by e-mail via <a href="@url">your personal contact form</a>. Note that while your e-mail address is not made public to other members of the community, 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"))),
    );
    return $form;
  }
  elseif ($type == 'validate') {
    return array('contact' => isset($edit['contact']) ? $edit['contact'] : FALSE);
  }
  elseif ($type == 'insert') {
    $edit['contact'] = variable_get('contact_default_status', 1);
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему