fix: lowercase email on local registration
This commit is contained in:
parent
22f436e72e
commit
dcb1b0188a
1 changed files with 3 additions and 0 deletions
|
|
@ -43,6 +43,9 @@ export class AuthService {
|
|||
if (process.env.DISALLOW_PLUS && body.email.includes('+')) {
|
||||
throw new Error('Email with plus sign is not allowed');
|
||||
}
|
||||
if (body instanceof CreateOrgUserDto) {
|
||||
body.email = body.email.toLowerCase();
|
||||
}
|
||||
const user = await this._userService.getUserByEmail(body.email);
|
||||
if (body instanceof CreateOrgUserDto) {
|
||||
if (user) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue