Opened 7 years ago
Closed 7 years ago
#42713 closed defect (bug) (fixed)
Users list does not display name if Last Name empty
Reported by: | antipole | Owned by: | dd32 |
---|---|---|---|
Milestone: | 4.9.5 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | Users | Keywords: | has-patch fixed-major |
Focuses: | administration | Cc: |
Description
Hi.. I have found that in the backend list of 'All users', the user's Name is shown as a dash (—) if the user's Last name field is empty.
For users with a First Name and Last Name, the Name is shown in the list of users as the concatenated First and Last names. But if the Last Name field is empty, the list just show a dash.
I think it should accept an empty Last Name field.
As a work around, when no Last Name is available, if I add a hard space (option space) in the Last Name field, then the list shows the First Name (plus probably the space).
Attachments (5)
Change History (17)
#2
follow-up:
↓ 3
@
7 years ago
- Milestone changed from Awaiting Review to 5.0
- Owner set to dd32
- Status changed from new to accepted
Patch seems good to me.
Perhaps we should also update wp_list_authors()
to also handle this for the show_fullname
parameter?
Currently it also only displays if both fields are set, it looks like all other locations in core handle falling back to which ever is actually available.
#3
in reply to:
↑ 2
;
follow-up:
↓ 5
@
7 years ago
Replying to dd32:
Perhaps we should also update
wp_list_authors()
to also handle this for theshow_fullname
parameter?
Currently it also only displays if both fields are set
Seems intentional there, if either first_name
or last_name
is not set, the name is not really "full" :)
This ticket was mentioned in Slack in #core by hardikamipara. View the logs.
7 years ago
#5
in reply to:
↑ 3
@
7 years ago
Replying to SergeyBiryukov:
Replying to dd32:
Perhaps we should also update
wp_list_authors()
to also handle this for theshow_fullname
parameter?
Currently it also only displays if both fields are set
Seems intentional there, if either
first_name
orlast_name
is not set, the name is not really "full" :)
That's fair, but everywhere else that we use the "full" name we use either of them, accounting for the fact there's not really anything "full" about having both.
But you're right, if wp_list_authors()
was just showing "John" for multiple people it'd be impossible to tell them apart. That'll probably be fixed in the future by something like Select2 where multiple pieces of info can be displayed at the same time.
I guess we'll skip it from wp_list_authors()
for now and just go with 42713.2.patch
All User Name List (First Name and Last Name)