mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 14:44:24 +00:00
check for error when doing a password reset
This commit is contained in:
parent
8cc055422c
commit
2cdadf1a4b
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ module.exports =
|
|||
if(user?)
|
||||
randomPassword = uuid.v4()
|
||||
AuthenticationManager.setUserPassword user._id, randomPassword, (error) ->
|
||||
if err?
|
||||
logger.err err:err, email:email, user_id:user._id, "problem reseting user password"
|
||||
return res.send 500
|
||||
emailOpts =
|
||||
newPassword: randomPassword
|
||||
to: user.email
|
||||
|
|
Loading…
Reference in a new issue