function contact_user_page

6.x contact.pages.inc contact_user_page($account)

Personal contact page.

1 string reference to 'contact_user_page'
contact_menu in drupal-6.x/modules/contact/contact.module
Implementation of hook_menu().

File

drupal-6.x/modules/contact/contact.pages.inc, line 156
User page callbacks for the contact module.

Code

function contact_user_page($account) {
  global $user;

  if (!valid_email_address($user->mail)) {
    $output = t('You need to provide a valid e-mail address to contact other users. Please update your <a href="@url">user information</a> and try again.', array('@url' => url("user/$user->uid/edit")));
  }
  else if (!flood_is_allowed('contact', variable_get('contact_hourly_threshold', 3))) {
    $output = t('You cannot contact more than %number users per hour. Please try again later.', array('%number' => variable_get('contact_hourly_threshold', 3)));
  }
  else {
    drupal_set_title(check_plain($account->name));
    $output = drupal_get_form('contact_mail_user', $account);
  }

  return $output;
}