[buddypress-trac] [BuddyPress Trac] #6259: user_name / username checks in bp_core_validate_user_signup

buddypress-trac noreply at wordpress.org
Thu Mar 5 16:02:59 UTC 2015


#6259: user_name / username checks in bp_core_validate_user_signup
---------------------------------+-----------------------------
 Reporter:  anthony.bartoli      |       Owner:
     Type:  idea                 |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Component - Members  |     Version:  2.2.1
 Severity:  normal               |  Resolution:
 Keywords:                       |
---------------------------------+-----------------------------

Comment (by boonebgorges):

 Thanks for the suggestion, anthony.bartoli. The `function_exists()`
 pattern is not really one that we use much in BP; among other things, it's
 subject to the problem of what to do when more than one plugin defines the
 function. A more sustainable solution, if we want to allow plugin devs to
 bypass BP's validation, is to put the following at the beginning of
 `bp_core_validate_user_signup()`:

 {{{
 $pre = apply_filters( 'bp_core_pre_validate_user_signup', false,
 $user_name, $user_email );
 if ( false !== $pre ) {
     return $pre;
 }
 }}}

 I'm not sure that this is the absolute best way to attack the problem.
 Plugin devs who use the filter would then be responsible for assembling a
 properly-formatted array of `$results`, not to mention the likelihood that
 bypassing some of BP/WP's core validation checks would result in breakage
 somewhere in the system. That being said, I think it's fine to introduce a
 pre-filter like this for the more intrepid devs out there, as long as no
 one else has an objection.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6259#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list