Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 7 months ago

#2136 closed defect (bug) (fixed)

Usernames and user-IDs mix if username is numeric.

Reported by: steilenhang's profile steilenhang Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.3 Priority: highest omg sweet tea
Severity: major Version: 2.2.2
Component: Component - Users Keywords: needs-patch
Cc:

Description

I have users at my site with numbers as usernames. When you click one of them in the forum to see his profile, the url might look like this: example.com/forums/users/8048 with 8048 beeing his username. But the profile that shows up does not belong to username 8048, it belongs to userID 8048 which is someone else. You never get to the right profile.

The story continiues with the links on the profile. It keeps mixing usernames and user-IDs.

Example:

User One: ID 1, username 8

User Two: ID 8, username 15

User Three: ID 15, username 1

Lets say you want to view the profile of user One. You will be shown the profile of user Two. If you then click on one of the links on the profile (favorites etc.), you will be sendt to user Three to view his favorites whatever you clicked..

A little hard to explain, but I think you get the idea. Hopefully someone understands what happens here.

Change History (4)

#1 @johnjamesjacoby
11 years ago

  • Milestone changed from Awaiting Review to 2.3
  • Owner set to johnjamesjacoby
  • Priority changed from normal to highest
  • Severity changed from normal to major

Huh. That's definitely a bug. I'll check it out for 2.3.

#2 @johnjamesjacoby
11 years ago

Quick note on this: users in a multisite installation have to have a letter in their username.

#3 @johnjamesjacoby
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4670]) Users on single-site installations can have all-numeric usernames, causing profile URLs like '/forums/users/55555/' to be parsed incorrectly.

In bbp_parse_query(), check the 'permalink_structure' option before checking if the 'bbp_user' WP query variable is not numeric.

This has the potentially negative side-effect of not being able to use the query-var with a numeric user ID when using pretty permalinks, but that was never intended behavior anyways.

Fixes #2136.

#4 @steilenhang
11 years ago

Wow John, that was quick!

Last edited 11 years ago by steilenhang (previous) (diff)
Note: See TracTickets for help on using tickets.