Bug Report #1279

User creation validation does not check for duplicate email

Added by Francis Avila almost 3 years ago. Updated over 2 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Sam de Freyssinet % Done:

0%

Category:Modules:Auth
Target version:2.3.3 Estimated time:2.00 hours
Resolution:fixed Points:

Description

If you create a user (using the model's validation) with an email address equal to an already-existing user's address, you get failure.

The Auth_User_Model::validate() method needs to check for email uniqueness, too.

Patch attached.

Note that the patch cannot make a distinction in error message between duplicate username and duplicate email.

auth_user.diff - Patch to check for duplicate email when saving (542 Bytes) Francis Avila, 04/21/2009 09:00 pm

Associated revisions

Revision 4363
Added by Sam de Freyssinet over 2 years ago

Fixes #1279, added new unique_key_exists() method for unified testing of unique keys

History

Updated by Kiall Mac Innes over 2 years ago

I really dislike the idea of using username_available for this.

I would be in favor of having username_exists only check for a uniqie username, and a new email_exists check for unique email address.

Updated by Sam de Freyssinet over 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Sam de Freyssinet
  • Estimated time set to 2.00

Kiall ++ Agreed I think there should be a separate method for this

Updated by Sam de Freyssinet over 2 years ago

  • Priority changed from High to Normal

Updated by Sam de Freyssinet over 2 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Fixed in r4363

Also available in: Atom PDF