trim and lower email to ensure future login will work

This commit is contained in:
Ulf Gebhardt 2022-02-28 02:05:05 +01:00
parent fcb6b1c2d3
commit ca3d4b87eb
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -335,7 +335,7 @@ export class UserResolver {
}
// Validate email unique
// TODO: i can register an email in upper/lower case twice
email = email.trim().toLowerCase()
// TODO we cannot use repository.count(), since it does not allow to specify if you want to include the soft deletes
const userFound = await DbUser.findOne({ email }, { withDeleted: true })
if (userFound) {