diff --git a/src/model/user.rs b/src/model/user.rs index 4ce2087..e12110d 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -486,6 +486,8 @@ WHERE id like ? } pub async fn find_by_name(db: &SqlitePool, name: &str) -> Option { + let name = name.trim().to_lowercase(); + sqlx::query_as!( Self, "