From b3a2d44937cbb97abb05fe8b7c0415d2e053f72e Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 16 Feb 2016 11:12:07 +0000 Subject: [PATCH] next -> callback --- .../app/coffee/Features/User/UserRegistrationHandler.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/User/UserRegistrationHandler.coffee b/services/web/app/coffee/Features/User/UserRegistrationHandler.coffee index 7465268023..f407091122 100644 --- a/services/web/app/coffee/Features/User/UserRegistrationHandler.coffee +++ b/services/web/app/coffee/Features/User/UserRegistrationHandler.coffee @@ -70,14 +70,14 @@ module.exports = UserRegistrationHandler = password: crypto.randomBytes(32).toString("hex") }, (err, user)-> if err? and err?.message != "EmailAlreadyRegistered" - return next(err) + return callback(err) if err?.message == "EmailAlreadyRegistered" logger.log {email}, "user already exists, resending welcome email" ONE_WEEK = 7 * 24 * 60 * 60 # seconds OneTimeTokenHandler.getNewToken user._id, { expiresIn: ONE_WEEK }, (err, token)-> - return next(err) if err? + return callback(err) if err? setNewPasswordUrl = "#{settings.siteUrl}/user/activate?token=#{token}&user_id=#{user._id}"