Announcement

Collapse
No announcement yet.

[vB 2.3.0] Rename User does not rename username in post table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [vB 2.3.0] Rename User does not rename username in post table

    URL of your forums: http://www.chemieonline.de/forum
    vBVersion: 2.3.0 RC1
    PHP version: 4.2.2
    MySQL version: 3.23.52
    Apache/webserver version: Apache/1.3.26
    Server operating system: Suse Linux 8.1

    I have renamed a user and after that also update all counters. I do not see it until now and a user tells me about it, but i am using the attachment viewer hack and on this page still the old username is displayed. After looking into the database i see that in the post table the field username is not updated with the new username, so i have to run a sql query every time i rename a user.
    Last edited by Streicher; Fri 28 Feb '03, 11:58am. Reason: mysql, php etc...
    Streicher

  • #2
    Perhaps an altered admin/user.php has caused this. Try reuploading the original file and trying to rename someone, or make a test user to rename. It should work.

    And of course keep an alternate copy of the altered file in case rewriting the current one doesn't help.
    "63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
    "Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
    Utopia Software - Current Software: Utopia News Pro (news management system)

    Comment


    • #3
      The database always stores the name the user was using at the time he made a given post. I'm not sure what the use of having this stuff in the MySQL database IS, exactly, but it's there. Update Counters should be sufficient to make the usernames listed as thread starters and last posters correspond with their current state, but there's really no reason to worry about how it lists them in the database. The important part isn't the name that's listed in the SQL stuff, it's the userid that's listed.

      I'm going to go completely out on a limb here, since I've no idea how the hack you've installed works, but I'm going to guess that the solution is to edit whichever templates your attachment viewer hack installed. Try using the username query in your postbit template in the hack template, as well - it may make them match up.
      Fool's Gold: Discussion of rock 'n' roll, movies, A Song of Ice and Fire, Discworld, The Wheel of Time, The Lord of the Rings, Dragonlance, Forgotten Realms, literature, games, and more. It's ace.

      Last.FM * LiveJournal

      Comment


      • #4
        Aaron is correct. There is a system on the update counters page to rebuild post usernames after you rename a user.

        Comment


        • #5
          My admin/user.php was not altered, so it can not be the problem. I look into the hack and it gets the username with $attachusername=$getuser[username]; from the post table, where the old username is stored, also after renaming and updating the counters. The username in the user table is correct and updated, but not in the post table. The problem is that the hack should use the user table instead of the post table but thats my problem and not the problem of the vB Team. I know that.
          I only want to give the hint, that the username in the post table should also be updated when you rename a user. Otherwise if there is a original function in the vB (and not a hack) that uses this field the username will be wrong.
          Streicher

          Comment


          • #6
            Seems to be a bug for me:

            post.username won't be updated, when you're changing an username.

            At least I couldn't find a query, that does this.
            Hints & Tips:
            [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


            http://sfx-images.mozilla.org/affili...efox_80x15.png

            Comment


            • #7
              I don't see what the problem is in including a query when a member's username is updated that goes something like:

              UPDATE posts SET username='blah' WHERE posterid='blah2'

              (I may have got the fieldnames wrong )

              Comment


              • #8
                I have already explained how to update the post table usernames. We don't automatically update the post table username records when you rename a user because some administrators like to have some sort of username history for their posts.

                It's not likely to change in the near future, and it's not a bug, it works like that because we designed it like that.

                Comment


                • #9
                  Originally posted by Kier
                  I have already explained how to update the post table usernames.
                  There is no update post info on the update counters page, only update thread info and this doesn't update the username in the posts-table and I couldn't find anything in /forum/admin/misc.php, that does it.
                  Hints & Tips:
                  [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


                  http://sfx-images.mozilla.org/affili...efox_80x15.png

                  Comment


                  • #10
                    Originally posted by Kier
                    I have already explained how to update the post table usernames. We don't automatically update the post table username records when you rename a user because some administrators like to have some sort of username history for their posts.

                    It's not likely to change in the near future, and it's not a bug, it works like that because we designed it like that.
                    Say what? Sorry, but that sounds like a poor design to me. The userid should have been used, not the username. If I'm searching through old posts and come across an "old" username, how am I suppose to reference it? What if I want to contact the post's author? Not likely to happen if the username's is out of date. Personally, I agree with the masses, the username should be updated in the posts table.
                    FASHIONification is all about fashion, beauty, style, love, and life.

                    Comment


                    • #11
                      Originally posted by BlueBear
                      Say what? Sorry, but that sounds like a poor design to me. The userid should have been used, not the username. If I'm searching through old posts and come across an "old" username, how am I suppose to reference it? What if I want to contact the post's author? Not likely to happen if the username's is out of date. Personally, I agree with the masses, the username should be updated in the posts table.
                      You can still contact it... If you click on the PM button, you'll still be directed to a page to PM by the userid (look at the URL to the PM button -- it's done by userid; as is the profile). Not having an up-to-date username just might be wanted by some webmasters who want to be able to see what posts were made by what username.

                      You can run Update Thread Info and Update Forum info if you so wish.

                      I personally don't care if you have to run update counters or if it automatically does so.
                      "63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
                      "Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
                      Utopia Software - Current Software: Utopia News Pro (news management system)

                      Comment


                      • #12
                        Good point about the userid in the PM.
                        FASHIONification is all about fashion, beauty, style, love, and life.

                        Comment

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