Forum


HomeHomePublicPublicDevelopmentDevelopmentGetting Deleted Date from ModuleInfo (moving module to recycle bin)Getting Deleted Date from ModuleInfo (moving module to recycle bin)
Previous
 
Next
New Post
6/22/2017 12:26 AM
 

 

Hi,
I am programatically trying to list all the modules that have been deleted in DNN 8.0.3.
I tried get the information from event log after enabling "Tab module deleted " but the information would be lost when some one clears the log.
So I cannot relay on the log to get this details.
So I am trying to create my own logic.

I am using this function to get all modules in the site.
DotNetNuke.Entities.Modules.ModuleController.Instance.GetAllModules().Cast<ModuleInfo>()
I am able to check if the module is deleted using the IsDeleted property.
I find that the Last modified date and last modified by user is not getting updated when a module is deleted.

Is there any way to check the datetime  when the module was deleted and the user who deleted the module?

 

Thanks in advance 

 

 
New Post
6/22/2017 3:24 AM
 

As far as I know there is just an IsDeleted field in the TabModules table to flag a deleted module. Nothing beyond that like date and user.

However check the TabModules table record from a deleted module and see if you can find the info stored there. If it is not stored there, then the information you are looking for just doesn't exist.

Aderson

 
New Post
6/22/2017 4:47 AM
 

Hi

I assume you are trying to find out who is deleting modules?

Again, assuming every user in NOT an admin, you may have a small number of suspects

You could therefore use an SQL query to cross reference delete date/time with login / logout

Apologies I've not tested this but I was just working on a site and I noted the Recycle Bin had dates next to the modules I had deleted

If your site is used by a 'large' company then your users (with editing rights) may be departmental and control different parts of the site, create users and give selective rights by department

Failing all of the above - teach you users not to DELETE modules but to set the expiry date and get them to 'log' the action in the module header / footer

I hope one of these work for you :-)

Regards

 

Dave

P.S. Who is clearing the audit log?

Maybe do something to extract the log on daily basis and store in an offline databases - Access?

 

 

 

 

 
Previous
 
Next
HomeHomePublicPublicDevelopmentDevelopmentGetting Deleted Date from ModuleInfo (moving module to recycle bin)Getting Deleted Date from ModuleInfo (moving module to recycle bin)



Try FREE
30 days money back guaranteed