[eluser]victorche[/eluser]
If you choose an authorisation by email (not username), registering with already existing mail is not allowed. This is good. But the situation with the usernames are a little bit strange. Can someone give some more details about the logic here?
For example, auth login method is email/password. Trying to register with already registered mail is not possible. But registering with an existing username is some kind of possible. If there is already an user "testing" and I try to register as "testing", there is no error. But anyway the user is added in the database as "testing1". If I try one more time, again a new row in the `users` table, with username "testing12", then "testing123".
What is the point of this? I mean... If it is allowed, then all of those registrations should have the username "testing".
And I want to ask how to avoid this. I don't want dublicate usernames in my case. And also I don't like the approach with adding 1,2,3 at the end of the username.
There was an example code here, about checking this during registration. But there is a function also ... extra_where
Can it be used in this case?