Author |
Topic  |
|
clj
Junior Member
 
145 Posts |
Posted - 21 July 2004 : 10:51:53
|
Hi,
Is there a way to automate deletion of pending members over a certain age?
Many thanks, Clare |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 21 July 2004 : 12:01:23
|
You could add a check on the birthdate they provide when registering and prevent them from doing so if they're not within the required age bracket. Of course, the easy way around this is to lie about your date of birth when registering.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 21 July 2004 : 17:03:56
|
clj, are you meaning 'real biological age' or 'duration in days since they registered' ?
As Shaggy said, if you're going off the 'real biological age' anyone who wants to register would just keep guessing a DOB until they get into the forum.
If you're talking about the Members Pending page, and removing them if they are still there after 15 days, then it is possible to do (could be quite easy) but I haven't seen any code to do that. |
 |
|
clj
Junior Member
 
145 Posts |
Posted - 22 July 2004 : 06:24:20
|
Sorry for the confusion, I mean old as in 'duration in days since they registered' on the Members Pending page.
Ideally I'd like all members that have been pending for over 30 days to be automatically deleted. I don't see how this could be done though - surely even if some code was written there'd need to be some admin intervention to actually run that code?
Thanks, Clare |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 22 July 2004 : 06:59:34
|
Opp, my apologies, the way your original post was phrased I jumped to the assumption that you meant biological age. Yes, you are correct, using ASP you would need to at least click on a link to initiate the script. Or you could execute the function when you perform another task such as logging into the admin section of your site, but this is far from an ideal solution as if you were logging into admin section more than once a day the script would be executed multiple times.
Anyway, here's the SQL you'd need to accomplish this, just change the x to the number of days you wish to delete members pending after."DELETE FROM "& strMemberTablePrefix & "MEMBERS_PENDING WHERE M_DATE < '" & DateToStr(dateadd("d",-x,strForumTimeAdjust)) & "'" <edit>I'd suggest testing it on a duplicate copy of your database before using it on your actual database, just in case anything goes wrong.</edit>
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 22 July 2004 07:00:56 |
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 22 July 2004 : 09:04:35
|
I guess the best place to put this code is on the pending members page, but before the SELECT to display pending members. |
 |
|
clj
Junior Member
 
145 Posts |
Posted - 23 July 2004 : 07:05:20
|
Great advice, thank you, I'll give it a go! Clare |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 23 July 2004 : 07:53:14
|
You're welcome, Clare; glad to help. Lemme know how you get on with it, I might package it up as a mini mod.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
clj
Junior Member
 
145 Posts |
Posted - 23 July 2004 : 12:10:47
|
Thanks Shaggy!
I've taken a db backup and run the code and it seems to work a treat! FYI I've put the code at line 224 of admin_accounts_pending.asp
I'll give it a week or so and test it in various situations (eg: approving members) before copying it onto my other 2 (larger) forums, but this will definitely save some admin time so I think it's a thumbs up!!
Thank you all again for your help (esp the SQL and advice where to place it) and encouragement!
Clare |
Edited by - clj on 23 July 2004 12:11:26 |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 23 July 2004 : 12:29:45
|
Glad to hear it.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
|
Topic  |
|