Lanigironu
01-01-2003, 10:00 PM
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.
Screenshots
1. This is how it looks in the Update Counters chooser. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335893)
2. Here it merged one user and erased one dupe. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335894)
3. No dupes were found. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335896)
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.
Screenshots
1. This is how it looks in the Update Counters chooser. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335893)
2. Here it merged one user and erased one dupe. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335894)
3. No dupes were found. (https://vborg.vbsupport.ru/attachment.php?s=&postid=335896)