Error adding new user using e-mail from previous user (after editing the e-mail of the previous user)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

After changing the e-mail of a blocked user and adding a new one (using the previous e-mail of the blocked user) Gitlab shows an error messaging telling us that the e-mail is already in use.

Steps to reproduce

  • Search for the blocked user (e-mail like user@test.com)
  • Change the e-mail of the user to something else (user-blocked@test.com)
  • Add a new user using the previous e-mail (user@test.com)
  • Gitlab will not allow the creation of the new user telling us that the e-mail was already taken.

Example Project

None, this is on the administration settings

What is the current bug behavior?

Gitlab doesn't allow to use the previous e-mail

What is the expected correct behavior?

Gitlab should allow us to use the previous e-mail if we change the value of the e-mail on the previous user.

Relevant logs and/or screenshots

The message:

image

Version

Gitlab 17.0.0 - Omnibus - Community Edition

Possible fixes

Edited by 🤖 GitLab Bot 🤖