diff options
author | David Rothstein <drothstein@gmail.com> | 2014-11-24 19:18:35 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2014-11-24 19:18:35 -0500 |
commit | de8762b201863542b1867737997a45c7100b8f2f (patch) | |
tree | 65daec8aba2a036214cc90deef348820be11c994 | |
parent | 84092f3d051c7d8904a63d38c81eb5f671b6e71b (diff) | |
download | brdo-de8762b201863542b1867737997a45c7100b8f2f.tar.gz brdo-de8762b201863542b1867737997a45c7100b8f2f.tar.bz2 |
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.
-rw-r--r-- | CHANGELOG.txt | 3 | ||||
-rw-r--r-- | modules/contact/contact.pages.inc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e97215da1..4e0f43386 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 ba8918bf5..233818ce5 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']; |