Fix user activation

This commit is contained in:
Jonathan Cremin 2015-09-04 00:04:48 +02:00
parent d10dc9113b
commit 7bbc5dcb15

View file

@ -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;
}