Restrict User Permanent Deletion
Last Post 07/05/2015 4:00 PM by Joseph Craig. 4 Replies.
Author Messages
Mobeen Qureshi
Nuke Newbie
Nuke Newbie
Posts:1


--
07/03/2015 5:38 AM  
DNN allows admin to soft delete a user. When deleted again, it will be removed permanently from database. How can it be restricted that no one can delete a user completely from database including admin?
Andy Stephenson DNN Creative
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:169


--
07/03/2015 7:51 AM  
Hi Mobeen,

Unfortunately that cannot be done with DNN out of the box. Admin will be able to soft and hard delete users.

Sorry,
Andy
Mobeen Qureshi
Nuke Newbie
Nuke Newbie
Posts:1


--
07/04/2015 1:38 AM  
Hi Andy,

Thanks for your reply.
I am a developer. By 'out of the box', you mean to say that it can not be disabled from configuration?
Can I modify your user management page from code level? If yes, can you guide me for the steps?

Regards,
Mobeen
Andy Stephenson DNN Creative
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:169


--
07/04/2015 8:41 AM  
Hi Mobeen,

You are correct. That is what I meant.

I'm not a programmer so I will not be able to guide you here, but feel free to download DNN's source code and try to figure things out. I have to tell you up front, It will be a lot of work to change DNN's core coding.

Best of luck,
Andy
Joseph Craig
DNN MVP
Posts:11667


--
07/05/2015 4:00 PM  
Yes, you probably can do that.

The easiest approach would be to find the Users and Roles module, and I think that the file you would want to look at is DesktopModules/Admin/Security/UserSettings.ascx. You probably can remove the "delete" link, or perhaps make it visible only to Super Users.

The absolute best way to do this would be to grab a copy of the source code for the module (from a "source" package for DNN). You could modify that one, perhaps also modifying the code behind file to achieve exactly the functionality that you want. It would be best to work with a copy of the module, and change the name and namespace of the module so that you can install it in parallel with the "stock" verstion of the module. Then you can install your version, delete the standard version from the Admin, User Account Page. If you do that, the module will not be overwritten when you install DNN, saving you the hassle of doing it again. And, should you want to revert to the standard module, just put it back on the page.

Joe Craig, Patapsco Research Group
Complete DNN Support


---