Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0764f304 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN Committed by Ronak
Browse files

TOS User registration data store

parent 3657bad8
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);