function contact_personal_page

Page callback: Form constructor for the personal contact form.

Parameters

$recipient: The account for which a personal contact form should be generated.

Throws

\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException

See also

contact_menu()

contact_personal_form_submit()

Related topics

1 string reference to 'contact_personal_page'
contact_menu in drupal/core/modules/contact/contact.module
Implements hook_menu().

File

drupal/core/modules/contact/contact.pages.inc, line 67
Page callbacks for the Contact module.

Code

function contact_personal_page($recipient) {
  global $user;

  // Check if flood control has been activated for sending e-mails.
  if (!user_access('administer contact forms') && !user_access('administer users')) {
    contact_flood_control();
  }
  drupal_set_title(t('Contact @username', array(
    '@username' => user_format_name($recipient),
  )), PASS_THROUGH);
  $message = entity_create('contact_message', array(
    'recipient' => $recipient,
    'category' => 'personal',
  ));
  return entity_get_form($message);
}