Merge transactions in MultifactorManageForm::save()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 17 Nov 2020 09:26:11 +0000 (10:26 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 18 Nov 2020 12:56:38 +0000 (13:56 +0100)
wcfsetup/install/files/lib/form/MultifactorManageForm.class.php

index 1afd08e3c898b7cdcc8c1b34abd9815b1d652001..8eea7c75177121bb8247fd5afbfb13ed4036d70a 100644 (file)
@@ -118,12 +118,11 @@ class MultifactorManageForm extends AbstractFormBuilderForm {
                $this->returnData = $this->processor->processManagementForm($this->form, $setup);
                
                $this->setup = $setup;
-               WCF::getDB()->commitTransaction();
                
-               WCF::getDB()->beginTransaction();
                if (!$this->hasBackupCodes()) {
                        $this->generateBackupCodes();
                }
+               
                WCF::getDB()->commitTransaction();
                
                $this->saved();