Browse Source

Merge pull request #5868 from nocodb/fix/5787-case-sensitive-username

fix: Make username case insensitive
pull/5873/head
Raju Udava 1 year ago committed by GitHub
parent
commit
d7cbafbb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nocodb/src/services/users/users.service.ts

5
packages/nocodb/src/services/users/users.service.ts

@ -32,7 +32,8 @@ import type {
export class UsersService {
constructor(private metaService: MetaService) {}
async findOne(email: string) {
async findOne(_email: string) {
const email = _email.toLowerCase();
const user = await this.metaService.metaGet(null, null, MetaTable.USERS, {
email,
});
@ -50,7 +51,7 @@ export class UsersService {
email: string;
lastname: any;
}) {
return this.metaService.metaInsert2(null, null, MetaTable.USERS, param);
return this.metaService.metaInsert2(null, null, MetaTable.USERS, { ...param, email: param.email?.toLowerCase() });
}
async registerNewUserIfAllowed({

Loading…
Cancel
Save