Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#5540 closed defect (bug) (fixed)

post-form.php displayed user firstname instead of logged in user firstname

Reported by: lenasterg's profile lenasterg Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: low
Severity: minor Version: 2.0
Component: Activity Keywords: has-patch
Cc:

Description

First of all, sorry for my bad English.

In bp-templates/bp-legacy/buddypress/activity/post-form.php
and bp-themes/bp-default/activity/post-form.php the

printf( __( "What's new, %s?" , 'buddypress' ) , bp_get_user_firstname() );

can lead to show the displayed user's firstname instead of the logged in user firstname.

Suggestion to change to:

printf( __( "What's new, %s?", 'buddypress' ),bp_get_user_firstname(bp_get_loggedin_user_fullname()) );


Change History (2)

#1 @boonebgorges
10 years ago

  • Component changed from Template Pack to Activity
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.1

#2 @boonebgorges
10 years ago

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

In 8405:

Specify logged-in user when getting first name for "What's new?" activity prompt

By default, BuddyPress only displays the post form in a context where
bp_get_user_fullname() would default to the logged-in user. However, if the
form is included elsewhere - such as on another user's profile - the first name
displayed would erroneously be that of the displayed user, rather than the
logged in user who is being prompted to post an update.

Fixes #5540

Props lenasterg

Note: See TracTickets for help on using tickets.