Fixed third party login
authorMarcel Werk <burntime@woltlab.com>
Mon, 25 Apr 2016 16:05:03 +0000 (18:05 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 26 Apr 2016 11:44:54 +0000 (13:44 +0200)
wcfsetup/install/files/lib/form/RegisterForm.class.php

index 4ebe9063acf660892927b3b0f3c057ba1654f2a9..511daba81035d0e343466c542738a2d97c6dface 100644 (file)
@@ -186,6 +186,15 @@ class RegisterForm extends UserAddForm {
                if (empty($_POST)) {
                        $this->languageID = WCF::getLanguage()->languageID;
                        
+                       if (WCF::getSession()->getVar('__username')) {
+                               $this->username = WCF::getSession()->getVar('__username');
+                               WCF::getSession()->unregister('__username');
+                       }
+                       if (WCF::getSession()->getVar('__email')) {
+                               $this->email = $this->confirmEmail = WCF::getSession()->getVar('__email');
+                               WCF::getSession()->unregister('__email');
+                       }
+                       
                        WCF::getSession()->register('registrationStartTime', TIME_NOW);
                        
                        // generate random field names