From: Joshua Thomas Date: Sat, 29 Aug 2020 00:49:31 +0000 (-0400) Subject: Bugfix: Adds case-insensitive SELECT queries to User_::find_by_username() (#1108) X-Git-Url: http://these/git/%22https:/nerdica.net/static/%7Blink%7D?a=commitdiff_plain;h=0f8372c0fb44acc46a247e225ce8afca9390058b;p=lemmy.git Bugfix: Adds case-insensitive SELECT queries to User_::find_by_username() (#1108) --- diff --git a/server/lemmy_db/src/user.rs b/server/lemmy_db/src/user.rs index 73da1c24..8416d38a 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 {