Regaez/grav-plugin-api

feat: support custom fields in user account

Regaez opened this issue · 1 comments

It is possible to define custom fields in a user account in Grav. If you add a custom field to the fields filter list in api.yaml config, then you can return the values of the custom fields in the UserResource response. They will be null if not set.

However, we only allow to set/update specific fields, such as title, fullname, state, access, email, groups, etc.

The UsersHandler class should be extended to allow these custom fields to be set on the UserResource.

FYI: We can iterate through the user profile fields with $user->toArray().