How to add extra user fields to User Management?

Hello,

Is it possible to add extra User Fields (biography, website) in the Users Table and accessing them through GET, POST via REST?

Thanks.

Hi @vijayr, the way to do this would be to modify your local (native) DB schema to add these fields to the User table, then modify the code to allow the user model object to use these additional fields.

Without modifying the code yourself, there is not currently a way to accomplish this.

Could you provide some additional details on your use case so we can evaluate the possibility of adding such a feature in a future release?

I believe it will be a good feature. Anyone who wants to create a REST API will need a User Management feature. Since Dreamfactory already has one, it should have the ability to add extra User Fields. I am pretty sure everyone would need more fields to configure their users.

1 Like

Thank you @vijayr, I have added this feature request to the development backlog to be considered for a future release.

@jeffreystables

https://www.dreamfactory.com/features/user-management

Documentation available at the above link mentions about creating “additional fields to the user object if needed”. Is this feature already available?

Hi @vijayr, if you’ve installed DreamFactory you can edit the user table schema directly (the user and role tables are in the MySQL db that comes installed with DreamFactory). The user and role tables are not currently exposed through the DreamFactory admin console user interface, but you can edit them directly.

Note that if you’re using the free hosted system, you can’t do this.

1 Like

Hello,

I added extra field to users table, do you know how to add this field to rest api call?

Hi @Serkan, this should be clear to you if you play with the API Docs a bit. All custom user fields are found at /rest/user/custom

[The image you are requesting does not exist or is no longer available]

Play around with the API Docs to test out GET, POST, and DELETE for all custom fields as well as for specific, individual fields.

1 Like

Hi @jeffreystables, This method calls a column which is “user_data”. But i created a new column in “df_sys_user” table. I want to call this column within API Docs.
Sorry but, i couldn’t achieve to call it.

Thanks,

Added fields in the user table would not be accessible through the API Docs natively.
IF you really wanted to achieve this you would need to edit the user model object in the DSP code itself.

A simpler solution would be to simply use the user/custom API to insert data into the user_data field.

1 Like

I have created gender field in user table but not able to insert data into this field

same issue here.how to write custom php code after adding extra column in user table

Hi Dreamfactory Team,
This feature has to be on top priority for future releases. Dreamfactory has user management but there should be provision to customize it as per our requirement like adding extra user fields while registering user and returning them while getting user profile.

Otherwise, we are not able to utilize DF user management and are forced to create separate logic for keeping custom user profile.

https://wiki.dreamfactory.com/DreamFactory/Tutorials/Managing_user_custom_data
The doc shows its possible with some minor edits. Can you please update doc with an example?

Is there any way to add custom user data using role lookup keys and manage it using GUI instead of API.I need to add company details in user custom fields and it should be shown in user listing interface and also need to modify it using interface.

I haven’t yet found a way. We always use another user table and reference it with DF user table. Let me know if you found a better solution.

I feel the User records should be expandable and we should be able to create our own fields in that.