From 58ba41a9c5d89af0d310d0cc1f0598c4079acb41 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 11 Apr 2023 19:36:14 +1200 Subject: [PATCH] Make password, hash and hashOptions optional so that they are optional in SDKs, and nulled when returning from the account service --- src/Appwrite/Utopia/Response/Model/User.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/User.php b/src/Appwrite/Utopia/Response/Model/User.php index 11a9bbf3a5..648b1c5dce 100644 --- a/src/Appwrite/Utopia/Response/Model/User.php +++ b/src/Appwrite/Utopia/Response/Model/User.php @@ -38,12 +38,14 @@ class User extends Model ->addRule('password', [ 'type' => self::TYPE_STRING, 'description' => 'Hashed user password.', + 'required' => false, 'default' => '', 'example' => '$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE', ]) ->addRule('hash', [ 'type' => self::TYPE_STRING, 'description' => 'Password hashing algorithm.', + 'required' => false, 'default' => '', 'example' => 'argon2', ]) @@ -58,6 +60,7 @@ class User extends Model Response::MODEL_ALGO_MD5, // keep least secure at the bottom. this order will be used in docs ], 'description' => 'Password hashing algorithm configuration.', + 'required' => false, 'default' => [], 'example' => new \stdClass(), 'array' => false,