36
Views
6
Comments
Solved
How to add and delete users through the app?
Application Type
Mobile

Hi,
Question: We are building a customer app in ODC. 
I have already added the Sign Up screen and created the logic to register a user. 


However, our users must also be able to delete their profile. There is no DeleteUser or DeleteUserProfile action available in ODC. The only solution I can think of, is create our own user entity. Does anyone have a better idea?

Thnx!!!

Hanneke

Solution

You have to build a shell around the Users in ODC and handle Delete and Activate op users in this shell, leaving the OutSystems users as they are.

Hi Hanneke

Directly you can not delete any record from the system entities. If you want to delete any specific record I suggest you to create a timer and schedule it's as while publish or any other you can.

Thanks 

Prince

Thank you Prince.

That would be quite laborious though, when we will have tens of thousands of users. There must be an easier way, surely?

Solution

You have to build a shell around the Users in ODC and handle Delete and Activate op users in this shell, leaving the OutSystems users as they are.

You need to use StartUserRegistration Server Action (System), supplying name and email address.


Next, use FinishUserRegistration Client Action (System), supplying email address, password, and verification code/token from StartUserRegistration above.

After this, you can start grant roles.

To make that user shown on User entity (actually it's a view), that user must be logged on first.

This is important if you liked to make User bootstrap (eg Approvers) and have some screen pick Approvers from dropdown (from User entity).

As long as the user has not logged in yet, it will not appeared on User entity.

Thank you, Harlin

As someone asked me how to create users in ODC, I thought it might be helpful to supply the link to the self registration documentation:

https://success.outsystems.com/documentation/outsystems_developer_cloud/building_apps/user_interface/self_registration_flow/

However, be careful: an email is not a unique key. Therefore the aggregate in the flow does not seem to be working correctly.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.