[wp-trac] [WordPress Trac] #57635: Check if empty user_nicename in the function wp_insert_user

WordPress Trac noreply at wordpress.org
Thu Jun 5 14:25:36 UTC 2025


#57635: Check if empty user_nicename in the function wp_insert_user
--------------------------------------+-----------------------------
 Reporter:  missveronicatv            |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Users                     |     Version:  6.1.1
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+-----------------------------

Comment (by rayhatron):

 Test this at WordCamp Europe 2025 using WordPress playground and recorded
 2 videos of the tests.

 Before the fix we can observe that a user is successfully created with an
 empty user_nicename which results in the author page link leading to a
 404. https://www.loom.com/share/f23eabfc48974f04919c9ed827ad5126?sid
 =9f58298e-ae09-4e7a-bba4-3aa901726347

 After the fix we can observe that if a user's user_nicename would be empty
 then no user is created and an appropriate error is returned.
 https://www.loom.com/share/1d1d9881694e453b870a056bed43ab6c?sid=1c7f0090
 -8dab-48e8-9a46-0772e096ea83

 Based on these results and a review of the code in the pull request, I've
 approved the pull request.

 Thanks @thehercules for the patch !!

 cc: @peterwilsoncc as discussed at contributor day, please review and
 continue with next steps if all is well.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57635#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list