Skip to content

[5.x]: User updating not working properly #15758

@kevinmu17

Description

@kevinmu17

What happened?

Description

I have a general config setting: useEmailAsUsername
When I add a user with email [email protected] and create it, that works. When I add another user with the same email address and save it (that works) but trying to activate the user, I get the error that the user already exists. All good up to this point. But now I want to edit this users email adres to [email protected]. This works, but when i'm trying to activate the user i get the error message again with the old email adres?

Steps to reproduce

  1. Create a user with email [email protected]
  2. Create another user with the same email adres and save it
  3. Try to activate user 2, you get the error message
  4. Change the email address to something unique
  5. Save the new email
  6. Activate the user again. You will get the error [email protected] user is already taken

Expected behavior

Update the username based on the new email address

Craft CMS version

5.4.4

PHP version

8.3

Operating system and version

macOS 15

Database type and version

mySQL 8

Image driver and version

No response

Installed plugins and versions

  • n/a

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions