user->getIdentity(); $this->database->table('UZIVATEL') ->get($identity->getId()) ->update([ 'TOTP_SECRET' => $secret, 'IS_2FA_ENABLED' => 1 ]); } public function disableTOTPSecret(): void { /** * Uživatelská identita = přihlášený user. * @var UserIdentity */ $identity = $this->user->getIdentity(); $this->database->table('UZIVATEL') ->get($identity->getId()) ->update([ 'TOTP_SECRET' => null, 'IS_2FA_ENABLED' => 0 ]); } }