mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 06:11:26 +00:00
Case-insensitive username at login (#2010)
* Case-insensitive username at login * formatting Co-authored-by: Kradyz <k@radiz.nl>
This commit is contained in:
parent
e36ad9d984
commit
1c5c02e1bf
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
use diesel::{result::Error, *};
|
||||
use lemmy_db_schema::{
|
||||
aggregates::person_aggregates::PersonAggregates,
|
||||
functions::lower,
|
||||
newtypes::{LocalUserId, PersonId},
|
||||
schema::{local_user, person, person_aggregates},
|
||||
source::{
|
||||
|
@ -81,8 +82,8 @@ impl LocalUserView {
|
|||
.inner_join(person::table)
|
||||
.inner_join(person_aggregates::table.on(person::id.eq(person_aggregates::person_id)))
|
||||
.filter(
|
||||
person::name
|
||||
.eq(name_or_email)
|
||||
lower(person::name)
|
||||
.eq(lower(name_or_email))
|
||||
.or(local_user::email.eq(name_or_email)),
|
||||
)
|
||||
.select((
|
||||
|
|
Loading…
Reference in a new issue