[wp-trac] [WordPress Trac] #20637: Change default display name for new users

WordPress Trac wp-trac at lists.automattic.com
Tue May 8 17:28:35 UTC 2012


#20637: Change default display name for new users
-------------------------+-----------------------------
 Reporter:  mikelittle   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Users        |    Version:
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 As discussed on the wp-hackers mailing list here
 http://lists.automattic.com/pipermail/wp-
 hackers/2012-May/thread.html#43064

 It has been suggested that the default display_name for a new user should
 be constructed from the supplied first name and last name.

 Attached is a patch to implement this behaviour. There are three parts:

 1) Move the assignment of the display_name (in wp_insert_user()) to be
 after the first_name and last_name are assigned in case any plugins hooked
 on their respective filters chooses to modify them.

 2) Add the $userdata parameter (passed to wp_insert_user()) to the filter
 call

 3) Add a default filter hooked to pre_user_display_name. This default
 filter will concatenate the first and last names with a space between
 (internationalized), only if the current display_name is empty and either
 of first or last is filled.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20637>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list