diff --git a/Core/API/TfaAPI.class.php b/Core/API/TfaAPI.class.php index 6b378ae..755b8e5 100644 --- a/Core/API/TfaAPI.class.php +++ b/Core/API/TfaAPI.class.php @@ -217,8 +217,6 @@ namespace Core\API\TFA { return $this->createError("Invalid 2FA-token endpoint"); } - $this->result["time"] = time(); - $this->result["time_zone"] = $this->context->getSettings()->getTimeZone(); $code = $this->getParam("code"); if (!$twoFactorToken->verify($code)) { return $this->createError("Code does not match"); diff --git a/Core/Objects/DatabaseEntity/TwoFactorToken.class.php b/Core/Objects/DatabaseEntity/TwoFactorToken.class.php index 3c1515a..e0e8c47 100644 --- a/Core/Objects/DatabaseEntity/TwoFactorToken.class.php +++ b/Core/Objects/DatabaseEntity/TwoFactorToken.class.php @@ -69,7 +69,7 @@ abstract class TwoFactorToken extends DatabaseEntity { public function confirm(SQL $sql): bool { $this->confirmed = true; - return $this->save($sql) !== false; + return $this->save($sql, ["confirmed"]) !== false; } public function jsonSerialize(?array $propertyNames = null): array {