Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#31959 closed defect (bug) (invalid)

New user is created even when errors in custom registration fields are returned.

Reported by: michalrusina's profile michalrusina Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.1
Component: Users Keywords: reporter-feedback
Focuses: administration, template Cc:


As per documentation there shouldnt be created new user if any errors are returned.

Ive added some custom registration fields, validated them and errors are successfully displayed, but the user is created. This happens only on custom fields, if i leave the default ones empty, they return errors and do not crerate new user.

Change History (4)

#1 @boonebgorges
9 years ago

  • Keywords reporter-feedback added

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' )

#2 @michalrusina
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#3 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted

This ticket was mentioned in Slack in #core by mikelopez. View the logs.

9 years ago

Note: See TracTickets for help on using tickets.