[wp-trac] [WordPress Trac] #59485: Invalid username

WordPress Trac noreply at wordpress.org
Tue Nov 26 10:58:16 UTC 2024


#59485: Invalid username
--------------------------+------------------------------
 Reporter:  rinkalpagdar  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  6.3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by ankitkumarshah):

 Hi @rinkalpagdar,

 Thank you for your thoughtful suggestion regarding username sanitization.
 The `sanitize_user()` function would indeed be a more appropriate choice
 than `sanitize_title()`, as it has been specifically designed for username
 sanitization in WordPress.

 https://developer.wordpress.org/reference/functions/sanitize_user/

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


More information about the wp-trac mailing list