fix: lowercase email on local registration

This commit is contained in:
Santosh Bhandari 2026-05-06 10:46:25 +05:45
parent 22f436e72e
commit dcb1b0188a

View file

@ -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) {