]> BookStack Code Mirror - bookstack/blobdiff - app/Users/Controllers/UserApiController.php
Add optional OIDC avatar fetching from the “picture” claim
[bookstack] / app / Users / Controllers / UserApiController.php
index 6ee8f16d15ed317de5dcdaa4748e07610b1da4b7..c84f1531d6a3853b417c455d0bd743564ea4c7e9 100644 (file)
@@ -37,7 +37,7 @@ class UserApiController extends ApiController
     {
         return [
             'create' => [
-                'name'  => ['required', 'string', 'min:2', 'max:100'],
+                'name'  => ['required', 'string', 'min:1', 'max:100'],
                 'email' => [
                     'required', 'string', 'email', 'min:2', new Unique('users', 'email'),
                 ],
@@ -49,7 +49,7 @@ class UserApiController extends ApiController
                 'send_invite'      => ['boolean'],
             ],
             'update' => [
-                'name'  => ['string', 'min:2', 'max:100'],
+                'name'  => ['string', 'min:1', 'max:100'],
                 'email' => [
                     'string',
                     'email',