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

02 Jan 2003, 07:00
Recently, my board has had problems with two entries being created in the database when some users register. This creates all sorts of problems, including the inabillity to activate the account, or inabillity to post once activated. Modifying the users through the admin CP is also made impossible because of the safechecking feature that prevents two userids to have two usernames. I am not sure if this is a MySQL problem, or the board's problem, or maybe it's even the user's fault.

What does this hack do?
This hack will automatically search for identical users and remove the older one if neither of the entries has posts. If one of them does have posts, the hack erases the one without them. If both have posts, the hack will merge the two into the newer (higher userid) one and add the posts fromthe older one.

As a result, this hack performs two things:
1. It fixes the problem of duplicate usernames on registration.
2. It fixes any dupes that may be created when importing from another board.

How reliable is it?
The hack checks two things:
1. The username.
2. The email.
If both are the same in the two instances, the hack will then perform the appropriate process.
I can easily add more variables to check if needed.

This hack is accessed in the admin control panel through the Update Counters chooser.

I only tested this hack on vb2.2.8, but it should work on all 2.2.x versions.

I will provide support to the best of my knowledge.

Before running this hack for the first time, I recommend backing up your users database in case anything goes wrong. This hack appears to be working perfectly (now that the tiny syntax error was fixed), but you never know.

1. This is how it looks in the Update Counters chooser. (http://www.vbulletin.org/forum/attachment.php?s=&postid=335893)
2. Here it merged one user and erased one dupe. (http://www.vbulletin.org/forum/attachment.php?s=&postid=335894)
3. No dupes were found. (http://www.vbulletin.org/forum/attachment.php?s=&postid=335896)

02 Jan 2003, 11:27
Is this the same as the " remove dupe mods" hack?

02 Jan 2003, 17:26
Offtopic, but if people are getting added twice on your board, wouldn't it be smart to upload an unhacked register.php? :)

08 Jan 2003, 03:19
Originally posted by partang2
Is this the same as the " remove dupe mods" hack?

I don't think so. I am not even familiar with that hack.

Link14716, I looked through register.php, it shouldn't create two entries. I am thinking that it might be some sort of glitch with MySQL. I'll have to see if there is anything hacked in register.php anyways, and maybe I'll try uploading an unhacked version. Thanks for the suggestion, though.