These are chat archives for getkirby/chat

27th
Sep 2015
Felix De Montis
@dervondenbergen
Sep 27 2015 16:01
Has someone already dealt with the problem, that two different users could have the same E-Mail address?
If I'm now looking for the user by the email, I assume that i will always get first user, which has given email address.
I now implemented a frontend login with the kirby user api but using the E-Mail address. In that case, if two people have the same E-Mail, the password check would always fail, as the wrong user is found by the search after E-Mail adress
Is there an easy solution, someone has already thought of?
Nico Hoffmann
@distantnative
Sep 27 2015 16:06
If you use the email address as login, shouldn't you prevent users from registering with the same email address?
Felix De Montis
@dervondenbergen
Sep 27 2015 16:21
Yes, that's the solution. I only tested until now if the username is already existing, as it is the primary key
Nico Hoffmann
@distantnative
Sep 27 2015 16:30
:+1: cause Kirby itself is totally fine with users that share the same email address
you could of course filter all users by the email address and then try for each remaining user in a foreach-loop if the password matches for one of them. but I wouldn't advise to do so