WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#24630 closed defect (bug) (duplicate)

Add New User UI incorrectly requires E-mail address

Reported by: raamdev Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

There is inconsistency between the Add New User UI required fields and the wp_create_user() function.

The wp_create_user() function has email as an optional parameter but the Add New User UI shows E-mail as a required field. If email is truly not required, the Add New User UI should not require it.

Change History (2)

#1 @raamdev
7 years ago

I see that register_new_user() in wp-login.php does require an e-mail address, so perhaps the requirement for an email address in the Add New User UI is valid. If so, perhaps a note about this inconsistency should be added to the documentation for wp_create_user() to avoid confusion.

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

wp_create_user() was introduced in [2872], $email became optional in [2915], apparently for the MT importer.

Calling wp_create_user() with an empty address throws an error, see #14417 (which was closed as a duplicate of #14767, going to do the same here). According to ticket:14767:3, we should make email addresses required and enforce uniqueness.

Note: See TracTickets for help on using tickets.