Skip to:

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#6428 closed defect (bug) (worksforme)

When a user updates nickname in profile-edit first_name and last_name is cleared

Reported by: thomasoriis's profile thomasoriis Owned by:
Milestone: Priority: omg pizza
Severity: critical Version: 2.2.3
Component: Core Keywords: needs-patch
Cc: alexander.berthelsen@…


Nickname clears first_name and last_name.

To reproduce the bug -
1) goto page /members/<user>/profile/edit/group/1/
2) update value of nickname
3) save
4) Goto user profile in the backend and notice that first_name and last_name is empty.

I have an idea to solve the issue. If first_name and last_name is added to the form I think it will solve the issue.
The root cause is as I see it is that: wp_insert_user expects that first_name and last_name is set else they are set to blank. check line 1919

This line: $first_name = empty( $userdatafirst_name? ) ? : $userdatafirst_name?; same goes for last_name.

However user should be able to deside if first_name and last_name should be visible to other users.

Change History (6)

#1 @thomasoriis
9 years ago

Actually the problem is resolved when I disable bp_disable_profile_sync. So I think you have a problem in that method ? xprofile_sync_wp_profile().

#2 follow-up: @DJPaul
9 years ago

@thomasoriis, what are you changing the nickname to? Anything, or some specific pattern?

#3 in reply to: ↑ 2 @thomasoriis
9 years ago

Replying to DJPaul:

@thomasoriis, what are you changing the nickname to? Anything, or some specific pattern?

@DJPaul > actually I update the value from trAdmin32 to trAdmin321 or something like that. But I don't think it is caused by the input. But remember you have to turn on the sync option.

#4 @lakrisgubben
8 years ago

  • Cc alexander.berthelsen@… added

I can't reproduce the issue (trunk and 2015 theme) where the first_name becomes empty by updating the name in the buddypress profile. But, if ones name in the bp-profile is only one word then last_name will be set to empty (if it has a space in it then the first word will be first_name and the following last_name). I can see that this could maybe be a bit confusing, but also quite in line with the spirit of 'BuddyPress to WordPress profile syncing'.

#5 @DJPaul
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I'm going to close this because we've periodically tried to figure out what's going on here for about a year, and haven't been able to reproduce.

We can re-open the ticket when we figure it out in the future. Thanks for the report, @thomasoriis, and I'm sorry that we haven't been able to fix it yet.

#6 @DJPaul
8 years ago

  • Component changed from API to Core
Note: See TracTickets for help on using tickets.