[5.x]: Creating users with same email address
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
You can add multiple users with the same email address. This creates various problems when having the config useEmailAsUsername. It is semi related to an earlier problem #15758 that has been fixed, but only when removing one of the activated users...
Steps to reproduce
- create 2 users with the same email adres and activate 1 of them
Expected behavior
Error handling when trying to create a second user with the same email
Actual behavior
Let's me create infinite users with a same email adres
Craft CMS version
Craft Pro 5.7.10
PHP version
8.4.7
Operating system and version
Linux 4.18.0-553.54.1.el8_10.x86_64
Database type and version
MySQL 8.0.42
Image driver and version
Imagick 3.8.0 (ImageMagick 7.1.1-43)
Installed plugins and versions
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in Craft Pro 5.7.10 with useEmailAsUsername enabled, creating two users with the same email and activating one. Trace the user-creation validation and compare it with issue #15758; done means the second duplicate email is rejected with clear error handling and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- authentication, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100