diff --git a/lib/Controller/UserController.php b/lib/Controller/UserController.php index dd87f13eea12cfec94bf54d9edf99cbce46637c7..975e7aa769cf80631fc1f3fa60f7e5f0d6988968 100644 --- a/lib/Controller/UserController.php +++ b/lib/Controller/UserController.php @@ -65,7 +65,7 @@ class UserController extends ApiController { * @PublicPage * @NoCSRFRequired */ - public function setAccountData(string $token, string $uid, string $email, string $recoveryEmail, string $hmeAlias, string $quota = '1024 MB'): DataResponse { + public function setAccountData(string $token, string $uid, string $email, string $recoveryEmail, string $hmeAlias, string $quota = '1024 MB', bool $tosAccepted = false): DataResponse { $response = new DataResponse(); if (!$this->checkAppCredentials($token)) { @@ -87,7 +87,7 @@ class UserController extends ApiController { $user->setEMailAddress($email); $user->setQuota($quota); - + $this->config->setUserValue($uid, 'terms_of_service', 'tosAccepted', intval($tosAccepted)); $recoveryEmailUpdated = $this->userService->setRecoveryEmail($uid, $recoveryEmail); if (!$recoveryEmailUpdated) { return $this->getErrorResponse($response, 'error_setting_recovery', 400);