Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...deleting users based on last log-in datedeleting users based on last log-in date
Previous
 
Next
New Post
5/21/2008 10:07 PM
 

I have an intranet and users authenticate with the Active Directory Provider. As Active Directory sync only works for the first time a user logs in, we need to delete DNN user accounts separately from AD User accounts or risk bloating the DB.

I was thinking of setting up a stored proc to do this based on when a user last logged in. If they hadn't logged in in say 6 weeks, then their account get deleted. This should cover anyone who takes their 4 weeks annual leave at once from getting deleted and losing their portal rights.

As far as I can tell so far, I have user info in dbo.Users, dbo.UserProfile, dbo.UserPortals, dbo.UserRoles, dbo.aspnet_Users and dbo.aspnet_UserProfile. If I just have my sproc delete the users from here, will this adversely affect anything else?

Secondly, on the Edit User Account form there is a Last Activity Date field but I can't find this in the DB. While there's a dbo.UsersOnline table, this is empty. I presume this is because I have Disable Users Online checked in my Host Settings. So I'm a little confused as to how the Edit User Account form is populating the Last Activity Date field.

thanks

Mike

 
New Post
5/22/2008 1:45 AM
 

Generally we have always recommended to not make direct database modifications to our users. The main concern is the possibility of disrupting dependencies and creating orphanated records in the database.

Some modules create references to specific records in profile and user tables. If you manually delete user record but do not cascade this to all the dependent tables you will run in to issues sooner or later.

 

The more elegant solution would be using DNN API to do this for you. Essentially you need to make a simple custom module that would integrate in to DNN scheduler provider and perform user pruning task for you. There are may be commercial user management modules already capable of this, check out DNN Marketplace http://marketplace.dotnetnuke.com/ for verified 3rd party modules.


Affordable DotNetNuke Hosting Affordable DNN Hosting & Support - www.ihostasp.net
Slavic Kozyuk
IHOST, LLC
Call toll-free: 1.800.593.0238
 
New Post
5/22/2008 8:58 PM
 

Thanks Slavic. It doesn't sound like a good idea anymore. I guess it's hard to know where ALL the dependencies exist.

 
New Post
5/23/2008 11:20 AM
 

You can have sql show you all the dependencies related to the root user table, its just a matter of checking it if you add any new modules / start using new modules in your site. We manually run sql commands to clean up our user accounts, cause we have ran into a similar situation as you. We tried a few 3rd party modules but found some of them do little more then just run deletes on the user table, others work fine and make sure there is no dependencies but they are a bit costly and tricky to verify without buying source / contacting the vendors, it was just easier for us to have sql tell us what the dependencies are and I just check the current listing versus a weekly spot check. Usually before our weekly delete runs.

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...deleting users based on last log-in datedeleting users based on last log-in date


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out