From 9e15477737a3196d3e3025a896653e03ff03f8c8 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 3 Aug 2019 23:56:44 +0200 Subject: [PATCH] prevent empty page at logout, clear error messages after displaying it --- src/Application/Controller/d3_account_totp.php | 6 +++--- src/Modules/Application/Component/d3_totp_UserComponent.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Application/Controller/d3_account_totp.php b/src/Application/Controller/d3_account_totp.php index bdeec95..3e1a144 100644 --- a/src/Application/Controller/d3_account_totp.php +++ b/src/Application/Controller/d3_account_totp.php @@ -23,17 +23,17 @@ class d3_account_totp extends AccountController public function render() { + $sRet = parent::render(); + // is logged in ? $oUser = $this->getUser(); if (!$oUser) { - dumpvar(__LINE__); - dumpvar($this->_sThisLoginTemplate); return $this->_sThisTemplate = $this->_sThisLoginTemplate; } $this->addTplParam('user', $this->getUser()); - return parent::render(); + return $sRet; } /** diff --git a/src/Modules/Application/Component/d3_totp_UserComponent.php b/src/Modules/Application/Component/d3_totp_UserComponent.php index b4a58ad..e741c36 100644 --- a/src/Modules/Application/Component/d3_totp_UserComponent.php +++ b/src/Modules/Application/Component/d3_totp_UserComponent.php @@ -81,7 +81,7 @@ class d3_totp_UserComponent extends d3_totp_UserComponent_parent return false; } } catch (d3totp_wrongOtpException $oEx) { - Registry::getUtilsView()->addErrorToDisplay($oEx); + Registry::getUtilsView()->addErrorToDisplay($oEx, false, false, "", 'd3totplogin'); } return 'd3totplogin';