Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4083 closed defect (bug) (fixed)

bp_forums_get_post_extras(): login and nicename are swapped

Reported by: wpdennis's profile wpdennis Owned by:
Milestone: 1.5.5 Priority: normal
Severity: normal Version:
Component: Forums Keywords:
Cc:

Description

In function "bp_forums_get_post_extras" the user details are loaded. But login and nicename are swapped:

$posts[$i]->poster_email    = $poster->user_email;
$posts[$i]->poster_login    = $poster->user_nicename;
$posts[$i]->poster_nicename = $poster->user_login;
$posts[$i]->poster_name     = $poster->display_name;

It should be:

$posts[$i]->poster_email    = $poster->user_email;
$posts[$i]->poster_login    = $poster->user_login;
$posts[$i]->poster_nicename = $poster->user_nicename;
$posts[$i]->poster_name     = $poster->display_name;

The function is defined in bp-forums-functions.php:
http://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-forums/bp-forums-functions.php#L545

BTW: In function "bp_forums_get_topic_extras" it is set correctly. Please have a look:
http://buddypress.trac.wordpress.org/browser/tags/1.5.4/bp-forums/bp-forums-functions.php#L404

Change History (3)

#1 @boonebgorges
13 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to 1.5.5

Confirmed. Good catch.

#2 @boonebgorges
13 years ago

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

(In [5918]) Fixes incorrect variable assignment in bp_forums_get_post_extras().
Fixes #4083. Props wpdennis

#3 @boonebgorges
13 years ago

(In [5919]) Fixes incorrect variable assignment in bp_forums_get_post_extras().
Fixes #4083. Props wpdennis

Note: See TracTickets for help on using tickets.