How to add extra user fields to User Management?


#1

Hello,

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

Thanks.


#2

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?


#3

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.


#4

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


#5

@jeffreystables

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


#6

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.


#7

Hello,

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


#8

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

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


#9

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,


#10

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.


#11

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


#12

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


#13

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.

http://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?