WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#9563 closed defect (bug) (fixed)

unique email is not enforced

Reported by: Denis-de-Bernardy Owned by: Nicholas91
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: General Keywords: has-patch tested
Focuses: Cc:

Description

When you create (or edit) a user in the admin area, email uniqueness is not enforced. See also: #1626

Attachments (1)

9563.diff (1.3 KB) - added by Denis-de-Bernardy 5 years ago.

Download all attachments as: .zip

Change History (10)

Denis-de-Bernardy5 years ago

comment:1 Denis-de-Bernardy5 years ago

  • Keywords has-patch tested added

comment:2 Denis-de-Bernardy5 years ago

the patch also makes the error codes consistent with those from the registration form.

comment:3 Nicholas915 years ago

  • Cc dragos.nicholas@… added
  • Owner changed from anonymous to Nicholas91
  • Status changed from new to assigned

Tested on Ubuntu/XAMPP.

comment:5 ryan5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [10990]) Enforce unique email addresses. Props Denis-de-Bernardy. fixes #9563

comment:7 Denis-de-Bernardy5 years ago

Tricky... I'm pretty certain it's extremely rare, though, due to the fact that the registration form has always enforced this. Only an admin could possibly create a user with a dup email, and that was more of a bug than anything else.

Imo we leave things as they are and let the rare admins that have dup users delete them -- WP does a good job at merging a user into another one when a user gets deleted.

comment:8 mattcaron4 years ago

  • Cc mattcaron added
  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm reopening this because it introduces a regression.

While the initial intent (not allowing multiple user registration) is reasonable, it introduces a problem as follows:

  1. Set up WP
  2. An admin user is created
  3. User's email is set to my email address
  4. I want my posts to show up as from me.
  5. So I create a new user (me) with my address.

Before this fix, this worked. After this fix, it stopped working. So, today, when I did a fresh install, I had to enter a bogus email and then change it in the DB backend.

Another option would be to be able to change the default admin account's username, but that can be problematic - better to just allow the creation of multiple accounts with the same address from the admin panel (perhaps with warning).

comment:9 scribu4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Please open a new ticket and leave this one as fixed in 2.8.

Note: See TracTickets for help on using tickets.