diff --git a/web/lib/auth.js b/web/lib/auth.js index e2b4cc9..58868b7 100644 --- a/web/lib/auth.js +++ b/web/lib/auth.js @@ -187,8 +187,8 @@ export function* activateUser(code) { const user = yield Users.findOne({activationCode: code}); if (user) { Users.updateOne({_id: user._id}, {'$unset': {activationCode: ''}}); - yield setupSession(this, user); - } else { - return false; + yield setupSession.call(this, user); + return true; } + return false; }