prevent empty page at logout, clear error messages after displaying it

This commit is contained in:
Daniel Seifert 2019-08-03 23:56:44 +02:00
parent cea9e246ba
commit 9e15477737
2 changed files with 4 additions and 4 deletions

View File

@ -23,17 +23,17 @@ class d3_account_totp extends AccountController
public function render() public function render()
{ {
$sRet = parent::render();
// is logged in ? // is logged in ?
$oUser = $this->getUser(); $oUser = $this->getUser();
if (!$oUser) { if (!$oUser) {
dumpvar(__LINE__);
dumpvar($this->_sThisLoginTemplate);
return $this->_sThisTemplate = $this->_sThisLoginTemplate; return $this->_sThisTemplate = $this->_sThisLoginTemplate;
} }
$this->addTplParam('user', $this->getUser()); $this->addTplParam('user', $this->getUser());
return parent::render(); return $sRet;
} }
/** /**

View File

@ -81,7 +81,7 @@ class d3_totp_UserComponent extends d3_totp_UserComponent_parent
return false; return false;
} }
} catch (d3totp_wrongOtpException $oEx) { } catch (d3totp_wrongOtpException $oEx) {
Registry::getUtilsView()->addErrorToDisplay($oEx); Registry::getUtilsView()->addErrorToDisplay($oEx, false, false, "", 'd3totplogin');
} }
return 'd3totplogin'; return 'd3totplogin';