[wp-trac] [WordPress Trac] #39067: wp_insert_user custom validation

WordPress Trac noreply at wordpress.org
Sun Dec 4 19:29:03 UTC 2016


#39067: wp_insert_user custom validation
-------------------------+-----------------------------
 Reporter:  shamim51     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Users        |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Currently there are no hooks in wp_insert_user where plugin can hook to
 validate any custom validation and prevent to insert/update user.

 If there can be added a hook before insert/update user to database, that
 will be very helpful for custom validation.

 sample code can be following

 {{{#!php
 $custom_user_validate = apply_filters( 'custom_user_validate', false );

 if ( is_wp_error( $custom_user_validate ) ) {
         return $custom_user_validate;
 }

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39067>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list