Fix captcha issue when using 3rd party registration
authorMatthias Schmidt <gravatronics@live.com>
Sat, 17 Jan 2015 14:33:13 +0000 (15:33 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 17 Jan 2015 14:33:13 +0000 (15:33 +0100)
wcfsetup/install/files/lib/form/RegisterForm.class.php

index 790bd82d91209ca9ddfa383dc30b636ac2fb71f0..8fe5c9098247fa9d485f9adce909806a001ef066 100644 (file)
@@ -178,8 +178,6 @@ class RegisterForm extends UserAddForm {
                        
                        if (WCF::getSession()->getVar('noRegistrationCaptcha')) {
                                $this->captchaObjectType = null;
-                               
-                               WCF::getSession()->unregister('noRegistrationCaptcha');
                        }
                }
                
@@ -499,6 +497,10 @@ class RegisterForm extends UserAddForm {
                        $this->captchaObjectType->getProcessor()->reset();
                }
                
+               if (WCF::getSession()->getVar('noRegistrationCaptcha')) {
+                       WCF::getSession()->unregister('noRegistrationCaptcha');
+               }
+               
                // login user
                UserAuthenticationFactory::getInstance()->getUserAuthentication()->storeAccessData($user, $this->username, $this->password);
                WCF::getSession()->unregister('registrationRandomFieldNames');