From 0f8372c0fb44acc46a247e225ce8afca9390058b Mon Sep 17 00:00:00 2001 From: Joshua Thomas Date: Fri, 28 Aug 2020 20:49:31 -0400 Subject: [PATCH] Bugfix: Adds case-insensitive SELECT queries to User_::find_by_username() (#1108) --- server/lemmy_db/src/user.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lemmy_db/src/user.rs b/server/lemmy_db/src/user.rs index 73da1c244..8416d38a1 100644 --- a/server/lemmy_db/src/user.rs +++ b/server/lemmy_db/src/user.rs @@ -142,7 +142,7 @@ impl User_ { } pub fn find_by_username(conn: &PgConnection, username: &str) -> Result { - user_.filter(name.eq(username)).first::(conn) + user_.filter(name.ilike(username)).first::(conn) } pub fn find_by_email(conn: &PgConnection, from_email: &str) -> Result {