1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 11:14:12 +02:00

Fix issue where a user with remembered-TFA was still getting a notice that they had to enable TFA

This commit is contained in:
Ryan Cramer
2020-07-10 12:49:22 -04:00
parent cd44d8b7f2
commit 6f1fddfedf

View File

@@ -897,7 +897,7 @@ class ProcessLogin extends Process implements ConfigurableModule {
$session->removeFor($this, 'copyVars'); $session->removeFor($this, 'copyVars');
} }
if(count($this->tfaRecRoleIDs) && !$this->tfaLoginSuccess) { if(!$user->hasTfa() && count($this->tfaRecRoleIDs) && !$this->tfaLoginSuccess) {
// determine if Tfa module is installed and user has role requiring Tfa // determine if Tfa module is installed and user has role requiring Tfa
$requireTfa = false; $requireTfa = false;
if(count($this->wire('modules')->findByPrefix('Tfa'))) { if(count($this->wire('modules')->findByPrefix('Tfa'))) {