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 unauthorized users scheduledDeleting unauthorized users scheduled
Previous
 
Next
New Post
7/21/2006 7:06 AM
 

In my signup process I inform the user that they must logon to the site within 24 hours otherwise the account will be deleted. Currently I check this manually and each day there are some users that did not login within 24 hours. I need to manually remove those users.

How do I create a scheduled task that runs every day and deletes those users? It should NOT delete all unauthorized users but only those who did not logon to the site within 24 hours.

You may wonder why I want this. If I don't do this I will have hundreds of unauthorized users in my database and I don't want that. Most of the time those users have invalid email addresses.

 
New Post
7/28/2006 3:04 PM
 
It would be nice to get this question answered.
 
New Post
8/1/2006 2:12 PM
 

I would like to know the answer to this as well.

Right now I am writing a stored procedure that Checks if the aspnet_Membership table has any records that have the same create and last login dates that are the same, and if any of those records are more than 7 days old (or in your case, more than 24 hors old).  We are setting it up so that SQL Server (2005) runs the stored procedure once a day.

Any thoughts on this?

 
New Post
8/1/2006 2:38 PM
 
That sounds good to me. Let me know if you have it finished.
 
New Post
8/1/2006 5:40 PM
 

Sorry for this quick and dirty post (I am really short on time).  You will need to modify the script from using day to hour and change it from 7 to 24:

 

Create Procedure Remove_Old_Unregistered_Users

As

Delete aspnet_Users

Where UserId in

(Select UserId From aspnet_Membership

WHERE CreateDate = LastLoginDate

AND DateDiff(day, GetDate(),CreateDate) >= 7 )

Delete aspnet_Membership

WHERE CreateDate = LastLoginDate

AND DateDiff(day, GetDate(),CreateDate) >= 7

Go

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Deleting unauthorized users scheduledDeleting unauthorized users scheduled


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