Only create sample habits+dailies when registered through website

This commit is contained in:
Phillip Thelen
2015-11-04 16:41:13 +01:00
parent e13c008076
commit 921ee881a5
2 changed files with 9 additions and 1 deletions

View File

@@ -123,6 +123,8 @@ api.registerUser = function(req, res, next) {
};
analytics.track('register', analyticsData)
user.registeredThrough = req.headers['x-client']
user.save(function(err, savedUser){
// Clean previous email preferences
// TODO when emails added to EmailUnsubcription they should use lowercase version