summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rothstein2014-11-25 00:18:35 (GMT)
committer David Rothstein2014-11-25 00:18:35 (GMT)
commitde8762b201863542b1867737997a45c7100b8f2f (patch)
tree65daec8aba2a036214cc90deef348820be11c994
parent84092f3d051c7d8904a63d38c81eb5f671b6e71b (diff)
Issue #2380143 by Lendude, pwolanin: Contact forms set an incorrect name and e-mail address on the global user object after the form is submitted.7.x
-rw-r--r--CHANGELOG.txt3
-rw-r--r--modules/contact/contact.pages.inc4
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e97215d..4e0f433 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,9 @@
Drupal 7.35, xxxx-xx-xx (development version)
-----------------------
+- Fixed a bug in the Contact module which caused the global user object to have
+ the incorrect name and e-mail address during the remainder of the page
+ request after the contact form is submitted.
Drupal 7.34, 2014-11-19
----------------------
diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc
index ba8918b..233818c 100644
--- a/modules/contact/contact.pages.inc
+++ b/modules/contact/contact.pages.inc
@@ -134,7 +134,7 @@ function contact_site_form_submit($form, &$form_state) {
global $user, $language;
$values = $form_state['values'];
- $values['sender'] = $user;
+ $values['sender'] = clone $user;
$values['sender']->name = $values['name'];
$values['sender']->mail = $values['mail'];
$values['category'] = contact_load($values['cid']);
@@ -270,7 +270,7 @@ function contact_personal_form_submit($form, &$form_state) {
global $user, $language;
$values = $form_state['values'];
- $values['sender'] = $user;
+ $values['sender'] = clone $user;
$values['sender']->name = $values['name'];
$values['sender']->mail = $values['mail'];