[wp-trac] [WordPress Trac] #31959: New user is created even when errors in custom registration fields are returned.
WordPress Trac
noreply at wordpress.org
Mon Apr 13 15:26:00 UTC 2015
#31959: New user is created even when errors in custom registration fields are
returned.
-------------------------------+---------------------------------------
Reporter: michalrusina | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.1.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration, template
-------------------------------+---------------------------------------
Changes (by boonebgorges):
* keywords: => reporter-feedback
Comment:
michalrusina - Can you give more detail about how you're doing your
validation, and in particular how you're modifying the `$errors` object
that's returned to the 'registration_errors' filter? Note that user
creation will only fail if `$errors-get_error_code()` is non-empty, which
means that you must register an error with the `$errors` object like this:
`$errors->add( 'foo', 'This is my error message' )`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31959#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list