XF 2.0 Change or Revert User ID

Vanjoe

Member
I merged two users and I did it backwards, I wanted the user to retain the old ID.

Is it possible post-merge to change the ID if I know the old ID, or revert the merge? I don't mind using a tool like phpmyadmin but I'm not sure what query to use or if changing the IDs manually would have an effect on the IDs of new members.
 
What if I:

  1. Get the current AUTO_INCREMENT value using:
    SQL:
    SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'database' AND TABLE_NAME = 'xf_user'
  2. Create a new user using the "Create new user" panel. 0 posts, 0 content.
  3. Assign it the old ID in the database.
  4. Merge the old user into the newly created user.
  5. Alter the auto increment value using
    SQL:
    ALTER TABLE xf_user AUTO_INCREMENT = value from step 1

My forum is off so I don't have to worry about someone signing up. My only concern is if other areas are affected by the creation of the new user.

My question at this point is, by using the create new user interface, are any tables incremented other than xf_user?
 
Top Bottom