aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/generate-code-contributors.ts2
-rw-r--r--server/models/account/user.ts8
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts
index 5c6620f7d..f1922a20e 100755
--- a/scripts/generate-code-contributors.ts
+++ b/scripts/generate-code-contributors.ts
@@ -169,7 +169,7 @@ function getZanataContributors () {
169 169
170function getContributorsBlacklist () { 170function getContributorsBlacklist () {
171 return { 171 return {
172 'Florian Bigard': true, 172 'Bigard Florian': true,
173 'chocobozzz': true, 173 'chocobozzz': true,
174 'Rigel': true 174 'Rigel': true
175 } 175 }
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index 27262af42..4c2c5e278 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -1,4 +1,4 @@
1import { FindOptions, literal, Op, QueryTypes } from 'sequelize' 1import { FindOptions, literal, Op, QueryTypes, where, fn, col } from 'sequelize'
2import { 2import {
3 AfterDestroy, 3 AfterDestroy,
4 AfterUpdate, 4 AfterUpdate,
@@ -465,7 +465,11 @@ export class UserModel extends Model<UserModel> {
465 465
466 const query = { 466 const query = {
467 where: { 467 where: {
468 [ Op.or ]: [ { username: { [ Op.iLike ]: username } }, { email } ] 468 [ Op.or ]: [
469 where(fn('lower', col('username')), fn('lower', username)),
470
471 { email }
472 ]
469 } 473 }
470 } 474 }
471 475