Fix contact form options' default values
authorMatthias Schmidt <gravatronics@live.com>
Wed, 16 Aug 2017 15:46:56 +0000 (17:46 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 16 Aug 2017 15:47:01 +0000 (17:47 +0200)
wcfsetup/install/files/lib/form/ContactForm.class.php

index 746cabf532e87482c673b251a21569be5f6c95fe..5e2c380f71872c828fb14b38e5edfd1a612109fa 100644 (file)
@@ -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();
                }
        }