From e563ec53457ad23466bf85074a9fa963bd107583 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 16 Aug 2017 17:46:56 +0200 Subject: [PATCH] Fix contact form options' default values --- wcfsetup/install/files/lib/form/ContactForm.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/form/ContactForm.class.php b/wcfsetup/install/files/lib/form/ContactForm.class.php index 746cabf532..5e2c380f71 100644 --- a/wcfsetup/install/files/lib/form/ContactForm.class.php +++ b/wcfsetup/install/files/lib/form/ContactForm.class.php @@ -142,9 +142,13 @@ class ContactForm extends AbstractCaptchaForm { public function readData() { parent::readData(); - if (empty($_POST) && WCF::getUser()->userID) { - $this->email = WCF::getUser()->email; - $this->name = WCF::getUser()->username; + if (empty($_POST)) { + if (WCF::getUser()->userID) { + $this->email = WCF::getUser()->email; + $this->name = WCF::getUser()->username; + } + + $this->optionHandler->readData(); } } -- 2.20.1