Developer forum

Forum » CMS - Standard features » Delete account

Delete account

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have a request from one of our clients to add the ability for a user to delete its own account permanently.

It seems to be some legal related request.

How do I do that from the User account?

The solution in question is 9.2.14

Thanks,

Adrian


Replies

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

This is not supported atm, but I expect that we will look into this in the near future. We have major incomming legal changes here in EU that require us to change this - the legal requirements just have to be finalized before we can change our applicaiton.

In the meantime: You can fairly easily build this yourself using User.Delete() or ask the customer to send a mail/phone requesting to be deleted.

Otherwise it's going to be a feature request.

BR

Martin

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Any news about this feature? 

 

Regards.

Unnsteinn

 
Nicolai Pedersen
Reply

No, but it is a simple piece of code in a razor template:

I.e. on the user profile page, do a link something like this: <a href="/Default.aspx?id=123&cmd=deleteuser">Delete account</a>

And in the profile template something like this:

if (Dynamicweb.Context.Current.Request.QueryString["cmd"] == "deleteuser")
                {
           var idOfUserToDelete = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId();
           Dynamicweb.Security.UserManagement.User.Delete(idOfUserToDelete);
           Dynamicweb.Frontend.LogOnHandler.LogOff();
        }

 

 

You must be logged in to post in the forum