MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / resetPassword

Method resetPassword

packages/server/src/commands/user.ts:59–71  ·  view source on GitHub ↗
(queryRunner: QueryRunner, email: string, password: string)

Source from the content-addressed store, hash-verified

57 }
58
59 async resetPassword(queryRunner: QueryRunner, email: string, password: string) {
60 logger.info(`Finding user by email: ${email}`)
61 const user = await queryRunner.manager.findOne(User, {
62 where: { email }
63 })
64 if (!user) throw new Error(`User not found with email: ${email}`)
65
66 validatePasswordOrThrow(password)
67
68 user.credential = getHash(password)
69 await queryRunner.manager.save(user)
70 logger.info(`Password reset for user: ${email}`)
71 }
72}

Callers 2

runMethod · 0.95
validateAndSubmitFunction · 0.45

Calls 2

validatePasswordOrThrowFunction · 0.90
getHashFunction · 0.90

Tested by

no test coverage detected