getKupshopUser()->hasGroupId($ignoredGroup)) { return false; } } return findModule(\Modules::TWO_FACTOR) && ($settings['two_factor']['enabled'] ?? false); } public function getEmailAuthRecipient(): string { return $this->email; } public function getEmailAuthCode(): string { $code = $this->authCode ?? null; if (!$code) { $code = $this->getKupshopUser()->getCustomData()['email_code']; if (!$code) { throw new \LogicException('The email authentication code was not set'); } } return $code; } public function setEmailAuthCode(string $authCode): void { $this->authCode = $authCode; } }