[buddypress-trac] [BuddyPress] #4622: Spaces allowed in screen names since 1.6 update

buddypress-trac noreply at wordpress.org
Fri Feb 15 23:08:53 UTC 2013

#4622: Spaces allowed in screen names since 1.6 update
 Reporter:  oceanwidedesigns  |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  Members           |     Version:  1.6
 Severity:  normal            |  Resolution:
 Keywords:  dev-feedback      |
Changes (by deltafactory):

 * cc: deltafactory (added)


 Weighing in that I'd like to see this fixed earlier in the name
 normalization process.

 For some added complexity, we use WooCommerce's registration forms to
 create the user. In the current production version, they improperly handle
 when the $user_id comes back as a WP_Error object. The resulting cast to
 int messes up the admin user: no fun. I've already submitted a patch for

 Our current solution is to add a filter for `sanitize_user` (which I
 believe validate_username() calls). I couldn't use
 `bp_core_strip_username_spaces()` because it uses `username_exists()`
 which eventually calls `sanitize_user()` resulting in an endless loop
 until memory_limit was reached.

 I understand that it's a tricky issue to fix in a compatible way. I think
 `sanitize_user` is the likely choice.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4622#comment:13>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list