Bugfix: Call to a member function Email() on null

This commit is contained in:
djmaze 2021-11-25 13:34:03 +01:00
parent 12a7a9e3fe
commit 85ddc5bbb2

View file

@ -105,8 +105,8 @@ trait Accounts
if (\strlen($sEmailToDelete) && isset($aAccounts[$sEmailToDelete])) {
$bReload = false;
// $oAccount = $this->getAccountFromToken();
if ($oAccount->Email() === $sEmailToDelete) {
$oAccount = $this->getAccountFromToken();
if ($oAccount instanceof AdditionalAccount && $oAccount->Email() === $sEmailToDelete) {
Utils::ClearCookie(self::AUTH_ADDITIONAL_TOKEN_KEY);
$bReload = true;
}