From b7a14f5696097d381ba68ad438b040f1c9067e92 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 10 Jan 2016 11:11:44 +0100 Subject: DB::Users: Perform case-insensitive email matching This fixes two things: - It's not possible to create two accounts with the same mail address with different case (although the user+xyz@domain trick still works). - The password reset form is now case-insensitive as well. Some people had problems with the case-sensitive behavior in the past. --- lib/VNDB/DB/Users.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm index ec8d707b..d6776b2b 100644 --- a/lib/VNDB/DB/Users.pm +++ b/lib/VNDB/DB/Users.pm @@ -35,7 +35,7 @@ sub dbUserGet { !$o{firstchar} && defined $o{firstchar} ? ( 'ASCII(username) < 97 OR ASCII(username) > 122' => 1 ) : (), $o{mail} ? ( - 'mail = ?' => $o{mail} ) : (), + 'LOWER(mail) = LOWER(?)' => $o{mail} ) : (), $o{uid} && !ref($o{uid}) ? ( 'id = ?' => $o{uid} ) : (), $o{uid} && ref($o{uid}) ? ( -- cgit v1.2.3