Skip to content
Snippets Groups Projects
Commit 04db6f2c authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #88945 by webernet: to field in personal contact form always blank.

parent d7705ea6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -316,7 +316,7 @@ function contact_user_page() {
}
else {
drupal_set_title($account->name);
$output = drupal_get_form('contact_mail_user');
$output = drupal_get_form('contact_mail_user', $account);
}
return $output;
......@@ -326,7 +326,7 @@ function contact_user_page() {
}
}
function contact_mail_user() {
function contact_mail_user($recipient) {
global $user;
$form['#token'] = $user->name . $user->mail;
$form['from'] = array('#type' => 'item',
......@@ -335,7 +335,7 @@ function contact_mail_user() {
);
$form['to'] = array('#type' => 'item',
'#title' => t('To'),
'#value' => $account->name,
'#value' => $recipient->name,
);
$form['subject'] = array('#type' => 'textfield',
'#title' => t('Subject'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment