summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-01-10 11:11:44 +0100
committerYorhel <git@yorhel.nl>2016-01-10 11:18:39 +0100
commitb7a14f5696097d381ba68ad438b040f1c9067e92 (patch)
treef82ff826ce0ef32e1c29f2aad493d9da1c3962ee /lib/VNDB/DB
parent8994032a68da279acdcc22963d7d6eda2d0e59f8 (diff)
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.
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r--lib/VNDB/DB/Users.pm2
1 files changed, 1 insertions, 1 deletions
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}) ? (