diff --git a/src/QUI/Auth/Google2Fa/Auth.php b/src/QUI/Auth/Google2Fa/Auth.php index d5123393c0b6522af7f88ed3e15d4447875bfe0c..98358f118f13b18ac3e6567df84e828cb37536bc 100644 --- a/src/QUI/Auth/Google2Fa/Auth.php +++ b/src/QUI/Auth/Google2Fa/Auth.php @@ -41,7 +41,14 @@ class Auth extends AbstractAuthenticator */ public function __construct($user = '') { - $this->User = QUI::getUsers()->getUserByName($user); + if (!empty($user)) { + try { + $this->User = QUI::getUsers()->getUserByName($user); + } catch (\Exception $Exception) { + $this->User = QUI::getUsers()->getNobody(); + } + } + $this->Google2FA = new Google2FA(); }