PDA

View Full Version : Automatically find and remove dupe users through Admin CP


Lanigironu
29 Dec 2002, 19:24
This hack now moved to the Full Releases forum.

It is located here (http://www.vbulletin.org/forum/showthread.php?s=&threadid=47242)

Lanigironu
29 Dec 2002, 19:27
This is how it looks in the Update Counters chooser:

Lanigironu
29 Dec 2002, 19:27
Here it merged one user and erased one dupe:

Lanigironu
29 Dec 2002, 19:28
No dupes were found:

partang2
29 Dec 2002, 19:33
Sounds like a good idea, but I do not like beta hacks who messes with my database..! Maybe later m8... Thanx anyway!

Lanigironu
29 Dec 2002, 19:46
I tested it extensively, there shouldn't be any bugs. I just put it in beta just in case.

partang2
29 Dec 2002, 20:29
Ok, I have a backup so I will try it for you now.... ;)

flup
29 Dec 2002, 20:36
Sounds great!! *looks arround...maybe gonna install*

flup
29 Dec 2002, 20:43
No dupe users were found.

:D

partang2
29 Dec 2002, 20:55
Oh, you are fast man! Makes the first post 09.36, installs the hack, tests it and posts the result here 09.43.....!!!

:banana:

Lanigironu
30 Dec 2002, 00:09
It only takes a minute to install, and the two main queries are pretty fast.

What about you, partang2?

Lanigironu
31 Dec 2002, 05:19
So I guess this hack doesn't have any bugs. Can this be moved to the full hacks please?

Chris M
31 Dec 2002, 13:52
Just re-release it, and use the "Admin Options" at the bottom of this page to close this thread:)

Satan

ixian
31 Dec 2002, 20:34
YES. THANK YOU.

Maybe no one else is saying it, but that's because they haven't had this problem. I forget the exact combo of hacks I had that did this, but it happened over a year ago and I am STILL finding dupes in my db, out of over 4,000 users. Thank you thank you thank you!

ixian
31 Dec 2002, 20:51
Hmm.

It installs easily enough, but I'm running into an error - maybe because I'm the only one so far besides the creator who has dupe users:)

When I click remove dupe users, the following error gets spat back:


Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: DELETE FROM `user` WHERE userid='2514
mysql error: You have an error in your SQL syntax near ''2514' at line 1

mysql error number: 1064



I can assume that my user 2514 is in fact a dupe but it goes no further. Any ideas? This is a great hack, I hope I can get it to work!

Fallout2man
01 Jan 2003, 00:41
Originally posted by ixian
Hmm.

It installs easily enough, but I'm running into an error - maybe because I'm the only one so far besides the creator who has dupe users:)

When I click remove dupe users, the following error gets spat back:


Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: DELETE FROM `user` WHERE userid='2514
mysql error: You have an error in your SQL syntax near ''2514' at line 1

mysql error number: 1064



I can assume that my user 2514 is in fact a dupe but it goes no further. Any ideas? This is a great hack, I hope I can get it to work!

It's a minor bug, Prince just forgot to put an ending '

Replace this:

if ($posts == 0){
$DB_site->query("DELETE FROM `user` WHERE userid='$userid");


With this:

if ($posts == 0){
$DB_site->query("DELETE FROM `user` WHERE userid='$userid'");

ixian
01 Jan 2003, 20:46
Thanks! That worked like a charm!

FYI, it found no less than 82 dupe users. This was a massively usefull hack for me, thanks again.

matthepepe
02 Jan 2003, 03:01
This hack worked great it deleted about 200 dupe accounts off of my board, but i would suggest to Lanigironu to update teh installation file to fix the changes that were made later on. I got the same error as the other guy until i made that code chage. Now that you know its a consistant bug you should fix that.

Lanigironu
02 Jan 2003, 06:52
Yes, sorry about that. I discovered it a while ago, and I was sure I fixed the instructions as well.

I also modified the queries to sort by the userid. It didn't seem to affect anything, but I figure it doesn't hurt. I'll just make the thread in full hacks with the new file.

Lanigironu
02 Jan 2003, 07:04
Ok. The new thread is located here (http://www.vbulletin.org/forum/showthread.php?s=&threadid=47242).