Changing userid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MDreamer
    New Member
    • Jul 2008
    • 24

    Changing userid

    Hi,

    I want to brainstorm with you guys about a thing that happened to me today. I am consulting with you AFTER all what i did in hope the i didn't do anything too stupid.

    It all started 2 days ago, i was on vacation and i logged in to my vBulletin forum using a WAP skin(via my cellphone), My username is MDreamer (It was userid 1) I typed Mdreamer as user and my password.
    What happened after that was that a new user with the same letters (just not case sensitive Mdreamer instead of MDreamer) was created and posted my message. It was odd.. I waited until I'll get home and i saw it on a regular PC and in fact, i had 2 users with the same name!
    I (stupidly) decided to marge those. userid 1 (me, the original Admin) and the new Mdreamer userid 3592 (the new guy) what happened after that is the BOTH of the users where deleted it wasn't protected via config.php because i forgot a comma
    I just realized I lost my admin. I had another back-door user for emergencies that i used to get a new admin for my vBulletin. Everything was back to normal except that all my messages became a Guset messages
    I couldn't allow is.. so (take a deep breath) i decided to do some SQL statements in the DB to get ownership on my original messages so people and i can search for them. I am a BI/OLAD/ELT/SQL programer so i felt at home. I made a reversed engineered ERD and I created a new user and updated the "ownership" for it:

    UPDATE 'post'
    SET 'userid' = 3592
    where 'username' = MDreamer

    UPDATE 'thread'
    SET 'posterid' = 3592
    where 'postusername' = MDreamer

    I also updated the message counter in 'user' table.

    Then I merged the user with another user with admin right and everything seems to be ok.. but i can't change the userid. when i tried then i got some really weird stuff.

    Did i damaged the DB? can I change somehow the userid with a vBulletin tool? I am afired that in the next upgrade or change i will run into serious trouble but i had no choice...

    please advice.
    Thanks

    Maayan Dreamer
  • borbole
    Senior Member
    • Feb 2010
    • 3074
    • 4.0.0

    #2
    It looks like you have been affected by this



    What errors are you getting when trying to change the uid?

    Comment

    • MDreamer
      New Member
      • Jul 2008
      • 24

      #3
      it was a bug in a mod.. not an Iranian hack attack although its very similar, the post that i saw was mine.. i found out why it happened. just need to know how to change the id with out destroying everything else..

      Comment

      • Andy
        Senior Member
        • Jan 2002
        • 5886
        • 4.1.x

        #4
        Originally posted by MDreamer
        but i can't change the userid. when i tried then i got some really weird stuff.
        What happened?

        Comment

        • MDreamer
          New Member
          • Jul 2008
          • 24

          #5
          Click image for larger version

Name:	ujy.jpg
Views:	1
Size:	98.4 KB
ID:	3680023

          I am getting my username buy as guest... it happened after i changed the userid in 'post','thread' and user table. is there anywhere else i need to change it to?

          Comment

          • Lynne
            Former vBulletin Support
            • Oct 2004
            • 26255

            #6
            Did you rebuild any counters after you did those queries?

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools <- awesome site for html/css help

            Comment

            • MDreamer
              New Member
              • Jul 2008
              • 24

              #7
              which counters do you mean? and how? using the AdminCP?

              Comment

              • borbole
                Senior Member
                • Feb 2010
                • 3074
                • 4.0.0

                #8
                Originally posted by MDreamer
                which counters do you mean? and how? using the AdminCP?
                Acp->Maintenance->Update Counters and run the Rebuild Thread Information, Rebuild Forum Information, Update User Names, Update Post Counts.

                Comment

                • Lynne
                  Former vBulletin Support
                  • Oct 2004
                  • 26255

                  #9
                  I'm talking about Maintenance > Update Counters

                  I don't fully understand what happened in the first place (I mean, understand what happened in the software for it to happen). But, I'm wondering if Fix Broken Profiles might help. Do a backup of your database first, just in case.

                  Please don't PM or VM me for support - I only help out in the threads.
                  vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                  Want help modifying your vbulletin forum? Head on over to vbulletin.org
                  If I post CSS and you don't know where it goes, throw it into the additional.css template.

                  W3Schools <- awesome site for html/css help

                  Comment

                  • MDreamer
                    New Member
                    • Jul 2008
                    • 24

                    #10
                    I don't think it would work because the counter has nothing to do with the "who wrote" the message issue.. its seems that its sort of a display issue because its appears as "mine" in the DB and it displays as mine only if the VB created the ID for the user. i guess it updates somewhere else regarding the creation... I am saying all that because all the changes are reflection immediately because the PHP query the DB each time using SQL.
                    I will try it but i don't think i would work... its something to do with the creation.. the user id needs to be somewhere else i presume..

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...