Bugfix: Adds case-insensitive SELECT queries to User_::find_by_username() (#1108)
This commit is contained in:
parent
4819bd5608
commit
0f8372c0fb
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ impl User_ {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_by_username(conn: &PgConnection, username: &str) -> Result<User_, Error> {
|
pub fn find_by_username(conn: &PgConnection, username: &str) -> Result<User_, Error> {
|
||||||
user_.filter(name.eq(username)).first::<User_>(conn)
|
user_.filter(name.ilike(username)).first::<User_>(conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_by_email(conn: &PgConnection, from_email: &str) -> Result<User_, Error> {
|
pub fn find_by_email(conn: &PgConnection, from_email: &str) -> Result<User_, Error> {
|
||||||
|
|
Loading…
Reference in a new issue