Closed tdammers closed 5 years ago
Further investigation shows that the emails in question are indeed in use; so the question is why GitLab doesn't find them when we query for them.
Found it! There are two API calls, one for finding users by username or email, and one for finding users only by username. Guess which one we were using...
Sometimes, GitLab will refuse to create a user because some other user already uses the same email address. However, just prior, the script asks for the user by the exact same address, and doesn't find anything. Example log entry:
In other words, asking GitLab for a user with email or username
redacted@redacted.de
yields no results, but then when we try to create a user with that exact email address, GitLab tells us that the email is already taken.