diff --git a/CHANGES.md b/CHANGES.md index d2ce6001e..13d1555de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,10 +2,15 @@ ## Features +* Upgraded core API PHP version to 7.4 * New database rule validation options * Update docs example with auth info * Allow non-web platform skip origin header +## Bug Fixes + +* Fixed bug where user status was saved as a string instead of an integer + # Version 0.4.0 (PRE-RELEASE) ## Features diff --git a/app/controllers/users.php b/app/controllers/users.php index e2aa8fe0e..716aa2db6 100644 --- a/app/controllers/users.php +++ b/app/controllers/users.php @@ -346,7 +346,7 @@ $utopia->patch('/v1/users/:userId/status') } $user = $projectDB->updateDocument(array_merge($user->getArrayCopy(), [ - 'status' => $status, + 'status' => (int)$status, ])); if (false === $user) {