how to delete account

Hi,

I want to create a functionality that allows users to delete their community accounts, and I'm not sure how to do it.

Should I logout the user before I delete them, will they automatically be logged out as they are deleted?

Can I use a REST service like the function below, or should I use a built-in delete stored procedure from the database?

                $.telligent.evolution.del({
                   url: $.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/users/{id}.json',
                   data: { 
                      'id': userId
                   },
                   success: function(response) {
                        
                   }
                });

Any feedback is appreciated.

Regards,

Silviu

Parents Reply
  • Right. If you're connecting directly to the database and calling stored procedures or executing other calls, you can expect to see subsequent broken functionality and errors due to other state that is modified by the platform and kept in sync across servers other than just calls to stored procedures.

    The correct way to do this is to only use the API, not DB.

    As for logging out, you could simply redirect the browser to the logout page after your REST request completes (in the success handler).

Children