Bug #1823

Links to nonexistent profiles on index and forumdisplay

Added by Lukasz Tkacz 6 months ago. Updated 3 months ago.

Status:Closed Start date:12/04/2011
Priority:Normal Due date:
Assignee:Tom Moore % Done:

0%

Category:Admin Control Panel
Target version:1.6.7
Reproducibility:Always Database Type:
Reported In MyBB Version:1.6.5 Database Version:
PHP Version: SQA assignments:Nathan Malcolm
Browser:

Description

MyBB generates links to nonexistent profiles - we can delete users, but on index or forumdisplay, there are sill links to "profiles".
Of course when we try to open this link, we have a message:

The member you specified is either invalid or doesn't exist.

MyBB should determine nonexistent profiles - maybe good choice is to delete lastposteruid when we delete user?
Script will continue to have lastposter username, and build_profile_link can return only username.
This is contained in the code, but for unknown reasons to me unused in index and forumdisplay:

function build_profile_link($username="", $uid=0, $target="", $onclick="")
{
    global $mybb, $lang;

    if(!$username && $uid == 0)
    {
        // Return Guest phrase for no UID, no guest nickname
        return $lang->guest;
    }
    elseif($uid == 0)
    {
        // Return the guest's nickname if user is a guest but has a nickname
        return $username;
    }
(...)

img1.png (65.8 kB) Lukasz Tkacz, 12/04/2011 04:25 am

History

#1 Updated by Nathan Malcolm 6 months ago

  • SQA assignments set to Nathan Malcolm

I'll take a look at it later on. I think the best solution would be to rebuild the forum counters when a user is deleted.

#2 Updated by Nathan Malcolm 6 months ago

  • Status changed from New to Confirmed

#3 Updated by Tom Moore 6 months ago

  • Category set to Admin Control Panel
  • Status changed from Confirmed to Assigned
  • Assignee set to Tom Moore
  • Target version set to 1.6.6

#4 Updated by Tom Moore 6 months ago

  • Status changed from Assigned to Resolved

See r5724.

#5 Updated by Nathan Malcolm 6 months ago

  • Status changed from Resolved to Closed

#6 Updated by Tom Moore 3 months ago

  • Target version changed from 1.6.6 to 1.6.7

Also available in: Atom PDF