From 50b4dcce56275e57fc15ade7529f5c501cad150d Mon Sep 17 00:00:00 2001 From: Nassim Bounouas Date: Tue, 2 Jul 2019 11:16:33 +0200 Subject: Fix/connection with email (#1917) * #1916 Load user by email - insensitive query * Revert "Case insensitive login" This reverts commit c1521ca3d757bee91f7dfbb15b3717162bf4997d. * #1916 Load user - insensitive query for username and sensitive for email * #1916 Unit test for insensitive username login && documentation --- server/models/account/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models') diff --git a/server/models/account/user.ts b/server/models/account/user.ts index aac691d66..0f425bb82 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -367,7 +367,7 @@ export class UserModel extends Model { static loadByUsername (username: string) { const query = { where: { - username + username: { [ Op.iLike ]: username } } } @@ -377,7 +377,7 @@ export class UserModel extends Model { static loadByUsernameAndPopulateChannels (username: string) { const query = { where: { - username + username: { [ Op.iLike ]: username } } } @@ -399,7 +399,7 @@ export class UserModel extends Model { const query = { where: { - [ Op.or ]: [ { username }, { email } ] + [ Op.or ]: [ { username: { [ Op.iLike ]: username } }, { email } ] } } -- cgit v1.2.3