Announcement

Collapse
No announcement yet.

Last user to register bug...

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

  • Last user to register bug...

    Ok, not sure if this is a bug or not... Or if something got messed up when we imported our UBB info. We noticed that the member count went up by 2, and the thread/reply counts were a little "padded" as well. When we upgraded to 1.1.1 today, that all fixed itself. Unfortunately, the [i]welcome to our newest member, username![/i] displays the wrong member now. I found the query that finds the newest member, [b]SELECT username,userid FROM user WHERE userid=$numbermembers[/b]. It looks like it will always be 2 behind now. Is there any way to fix this?
    We're Here Forums!
    [email protected]

  • #2
    Hmmm. I'm not exactly sure why it should be doing that, but try this code instead:

    [code]
    $getnewestusers=$DB_site->query_first("SELECT username,userid FROM user ORDER BY joindate DESC LIMIT 1");
    [/code]

    John
    John Percival

    Artificial intelligence usually beats real stupidity ;)

    Comment


    • #3
      This bit of code did not work. It dropped the member number displayed down 17 member numbers, where before it was only 2.

      Hope that made sense:)
      Attached Files
      We're Here Forums!
      [email protected]

      Comment


      • #4
        Bug?

        421 Users registered

        Let's have a look at my table "user":

        I have entries for users with the id:

        1 exists
        2 to 5 doesn't exist
        6 exists
        7 to 24 doesn't exist
        25 to 419 exists

        The last member owns the userid 442 !

        vB shows in the forumhome as last member the data of member 421 instead of 442 .... i think cause it simply counts the amount of entries in the table "user" and adds the name and link of the my member 421 (the real amount of members) instead of the last entry in the table ....

        How could i fix this?

        Should vB offers something like "Renumber members" in the controlpanel?


        Comment


        • #5
          This is fixed in the next version. Until then, you can use that code above.

          John
          John Percival

          Artificial intelligence usually beats real stupidity ;)

          Comment


          • #6
            WE ended up using

            [code]$query = "select * from user order by userid desc limit 1";[/code]

            in replacement to the SQL query that john suggested.
            We're Here Forums!
            [email protected]

            Comment


            • #7
              What file is that code go into?

              Comment


              • #8
                [QUOTE][i]Originally posted by Rick Horwitz [/i]
                [B]What file is that code go into? [/B][/QUOTE]

                forum/index.php

                Find on Line 90:

                [code]
                $getnewestusers=$DB_site->query_first("SELECT username,userid FROM user WHERE userid=$numbermembers");
                [/code]

                That's the one you need to change, to which-ever version above you want :)

                Katherine

                Comment


                • #9
                  When we used Johns version it was seriously off for some reason, but that one I posted seemed to fix all problems with our last registered members:)
                  We're Here Forums!
                  [email protected]

                  Comment

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