Last user to register bug...

January 6th, 2009
  • 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 welcome to our newest member, username! displays the wrong member now. I found the query that finds the newest member, SELECT username,userid FROM user WHERE userid=$numbermembers. It looks like it will always be 2 behind now. Is there any way to fix this?


  • Originally posted by Rick Horwitz
    What file is that code go into?

    forum/index.php

    Find on Line 90:


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


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

    Katherine


  • WE ended up using

    $query = "select * from user order by userid desc limit 1";

    in replacement to the SQL query that john suggested.


  • What file is that code go into?


  • 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:)


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

    John


  • 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?


  • 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:)


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


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


    John







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Last user to register bug... , Please add it free.