grav-plugin-api icon indicating copy to clipboard operation
grav-plugin-api copied to clipboard

feat: support custom fields in user account

Open Regaez opened this issue 4 years ago • 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.

Regaez avatar Mar 19 '20 20:03 Regaez

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

Regaez avatar Mar 30 '20 22:03 Regaez