Save/update additional data with user

0 votes
Hi again,

I have a question about how to save additional data with user.

In user service, there is a "save additional data along with user" API. But it could only be called when create a user. Now I want to update those data when user is already there. Is there anyway other than storage service that could fulfill this function.

Thanks!
asked Jul 29, 2014 in App42 Cloud API-BaaS by Bob Anoop (19 points)
recategorized Oct 22, 2014 by sushil

1 Answer

+1 vote
Hi Bob,
 
Thanks for writing to us.
 
To update information of already created user, you can use CreateOrUpdateProfile function. If you want to add more information other than profile info then you can  use addJSONObject function followed by CreateOrUpdateProfile function.
 
Yes the information you will save in user object will be saved in the form of json and you can access or modify it using storage service.
 
Let me know if it answer your question.
 
Thanks
answered Jul 30, 2014 by sshukla480 (407 points)
Thanks for the answer. But it seems that it's a global configuration on user service. Is there any way to remove that JSON object after it is added?
If you want to remove JSON object from user service you can reinitialize the user service after getting response from server like this;
userService = App42API.buildUserService();
Thanks very much for the great answer!
Hi, the username and email cannot be update by user right?
Hi,

Username is unique which can't be updated. However, email id can be updated by user using this function (http://api.shephertz.com/app42-docs/user-management-service/#update-email).

Also, if you have a use-case where you want to change the username then it can be easily resolved by saving his display name in Storage service. How? At the time creating a user, you can add meta information along with it. In future you can update that value using Storage service(http://api.shephertz.com/app42-docs/nosql-storage-service/) functions. Please have a look at this link(http://api.shephertz.com/app42-docs/user-management-service/#saving-additional-data-along-with-user) and let us know if it helps.

Regards,
Himanshu Sharma
Thank you for the answer.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...