Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (Jake, A-GATE), 29 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/20/03
Posts: 4424
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 2 of 2 < 1 2
Topic Options
#227198 - 06/16/09 04:38 PM Re: How do we remove old users with non-validated emails? [Re: plattapuss]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Then I think Ricks suggestion using the member management in the control panel would be the best option.
You can build searches for what you are looking for in the advanced search options but still get to preview the list. That way the oddball stuff can be reviewed.
_________________________
Blue Man Group
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#227212 - 06/17/09 05:37 PM Re: How do we remove old users with non-validated emails? [Re: Rick]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Originally Posted By: Rick
No time limit involved, and that will work fine for users that you haven't been approved yet. From my understanding he's looking for users already in the database and active, but have either never logged on, or were in the database already prior to when email validation was turned on.

Okay Rick I have a rebuttal on this issue.
In the language file "adduser.php" There is a field called "VERIFY".
In this field is the message"You need to verify your email to activate this account. You will receive an email shortly with instructions for verifying your email. If this account isn't verified within 24 hours it will be deleted."
Without looking any farther it appears something deletes the registration Que within 24 hours of the registration if not verified???
_________________________
Blue Man Group
Top
#227213 - 06/17/09 06:07 PM Re: How do we remove old users with non-validated emails? [Re: Ruben]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Okay I found something in "adduser.inc.php"
Quote:
00124: // Get rid of any unverified email accounts that are over 24 hours old
00125: $deldate = $html -> get_date();
00126: $deldate = $deldate - 86400;
00127:
00128: $query = "
00129: SELECT USER_ID
00130: FROM {$config['TABLE_PREFIX']}USERS
00131: WHERE USER_IS_APPROVED <> 'no'


Would this not delete users from the que after 24 hours!
Of course I did not copy the whole section but you will see that it purges the registration Que after 24 hours. At least it seems so.

My opinion is the Que should stay there until the Admin deletes it
_________________________
Blue Man Group
Top
#227215 - 06/17/09 09:23 PM Re: How do we remove old users with non-validated emails? [Re: Ruben]
JAISP Offline
old hand
Registered: 02/10/07
Posts: 1144
I would rather not be bothered on manually deleting every registration that has not been email verified in the time limit. Why not let the program just delete it?
Top
#227221 - 06/18/09 04:20 PM Re: How do we remove old users with non-validated emails? [Re: JAISP]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Well I think it is a issue when a member has a problem with registration and gets deleted within 24 hours. I think that is to short a duration.
Rick stated something will be placed in V8. Hopefully it will be a option to set a time limit ourselves like 0 to not delete or 24,48,72 hours to self delete. That way it keeps us all happy campers.

Of course in the meantime we could hack it in.
_________________________
Blue Man Group
Top
#241418 - 01/28/11 03:39 PM Re: How do we remove old users with non-validated emails? [Re: plattapuss]
plattapuss Offline
stranger
Registered: 10/29/07
Posts: 14
Loc: Canada
A long over due update to this thread. The original MySQL queries would delete a lot of valid users with valid posts. Here is a refined Query that will delete only users that have no posts, have not validated their email, have not accepted the board rules, are over 50 days old and have no private messages.

The reason for all the checks for no this and no that, are from members that signed up back in the early days of this forum when a lot of features didn't exist. Our board dates back to 2000.

Here is the query to find bogus users:

Code:
SELECT USER_ID 
FROM ubbt_USERS 
WHERE USER_ID in (
SELECT u.USER_ID FROM ubbt_USERS as u
JOIN ubbt_USER_DATA AS ud 
ON ud.USER_ID = u.USER_ID  
JOIN ubbt_USER_PROFILE as uup 
ON u.USER_ID=uup.USER_ID  
LEFT JOIN ubbt_PRIVATE_MESSAGE_USERS AS upmu 
ON upmu.USER_ID = u.USER_ID 
LEFT JOIN ubbt_PRIVATE_MESSAGE_TOPICS AS upmt 
ON upmt.TOPIC_ID = upmu.TOPIC_ID 
AND upmt.USER_ID = u.USER_ID 
LEFT JOIN ubbt_PRIVATE_MESSAGE_POSTS AS upmp 
ON upmp.TOPIC_ID = upmu.TOPIC_ID 
AND upmp.USER_ID = u.USER_ID 
WHERE USER_TOTAL_POSTS=0  
AND upmu.USER_ID IS NULL 
AND upmt.USER_ID IS NULL 
AND upmu.USER_ID IS NULL 
AND USER_LAST_VISIT_TIME < unix_timestamp(now()) - (60*60*24*50)  
AND USER_REGISTERED_ON=USER_LAST_VISIT_TIME
);


And the query to delete those users:
Code:
DELETE u, ud, uup 
FROM ubbt_USERS as u 
JOIN ubbt_USER_DATA AS ud 
ON ud.USER_ID = u.USER_ID  
JOIN ubbt_USER_PROFILE as uup 
ON u.USER_ID=uup.USER_ID  
LEFT JOIN ubbt_PRIVATE_MESSAGE_USERS AS upmu 
ON upmu.USER_ID = u.USER_ID 
LEFT JOIN ubbt_PRIVATE_MESSAGE_TOPICS AS upmt 
ON upmt.TOPIC_ID = upmu.TOPIC_ID 
AND upmt.USER_ID = u.USER_ID 
LEFT JOIN ubbt_PRIVATE_MESSAGE_POSTS AS upmp 
ON upmp.TOPIC_ID = upmu.TOPIC_ID 
AND upmp.USER_ID = u.USER_ID 
WHERE USER_TOTAL_POSTS=0  
AND upmu.USER_ID IS NULL 
AND upmt.USER_ID IS NULL 
AND upmu.USER_ID IS NULL 
AND USER_LAST_VISIT_TIME < unix_timestamp(now()) - (60*60*24*50)  
AND USER_REGISTERED_ON=USER_LAST_VISIT_TIME;
Top
#241421 - 01/28/11 06:13 PM Re: How do we remove old users with non-validated emails? [Re: plattapuss]
driv Offline

Pooh-Bah
Registered: 01/10/04
Posts: 2377
Hey Plattapuss,
That's really interesting. (Thanks smile )

However, I was quite shocked to see such a massive figure returned in the results.

I haven't analysed the data yet but the figure is (very) high...

Interesting though, to note that all bar *1* are prior to the date that I moved to Threads in January '07.

Do you think that could be down to (specifically) validation of email / acceptance of board rules?
_________________________
Using version :: 7.5.6
Top
Page 2 of 2 < 1 2



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image