mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
also make email lowercase on email functions
This commit is contained in:
parent
7358524168
commit
396907ce89
@ -408,6 +408,7 @@ export class UserResolver {
|
|||||||
@Authorized([RIGHTS.SEND_ACTIVATION_EMAIL])
|
@Authorized([RIGHTS.SEND_ACTIVATION_EMAIL])
|
||||||
@Mutation(() => Boolean)
|
@Mutation(() => Boolean)
|
||||||
async sendActivationEmail(@Arg('email') email: string): Promise<boolean> {
|
async sendActivationEmail(@Arg('email') email: string): Promise<boolean> {
|
||||||
|
email = email.trim().toLowerCase()
|
||||||
const user = await DbUser.findOneOrFail({ email: email })
|
const user = await DbUser.findOneOrFail({ email: email })
|
||||||
|
|
||||||
const queryRunner = getConnection().createQueryRunner()
|
const queryRunner = getConnection().createQueryRunner()
|
||||||
@ -448,7 +449,7 @@ export class UserResolver {
|
|||||||
@Query(() => Boolean)
|
@Query(() => Boolean)
|
||||||
async sendResetPasswordEmail(@Arg('email') email: string): Promise<boolean> {
|
async sendResetPasswordEmail(@Arg('email') email: string): Promise<boolean> {
|
||||||
// TODO: this has duplicate code with createUser
|
// TODO: this has duplicate code with createUser
|
||||||
|
email = email.trim().toLowerCase()
|
||||||
const user = await DbUser.findOneOrFail({ email })
|
const user = await DbUser.findOneOrFail({ email })
|
||||||
|
|
||||||
const optInCode = await getOptInCode(user.id)
|
const optInCode = await getOptInCode(user.id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user