Skip to content

Commit

Permalink
Merge 8d168a0 into 8e6f4a1
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Apr 5, 2017
2 parents 8e6f4a1 + 8d168a0 commit 61204bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion website/server/controllers/api-v3/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ api.registerLocal = {
if (existingUser) {
res.respond(200, savedUser.toJSON().auth.local); // We convert to toJSON to hide private fields
} else {
res.respond(201, savedUser);
let userJSON = savedUser.toJSON()
userJSON.newUser = true;
res.respond(201, userJSON);
}

// Clean previous email preferences and send welcome email
Expand Down
2 changes: 1 addition & 1 deletion website/server/models/user/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function _setUpNewUser (user) {
user.purchased.background.violet = true;
user.preferences.background = 'violet';

if (user.registeredThrough === 'habitica-web' || user.registeredThrough === 'habitica-android') {
if (user.registeredThrough === 'habitica-web') {
taskTypes = ['habit', 'daily', 'todo', 'reward', 'tag'];

_.each(iterableFlags.tutorial.common, (val, section) => {
Expand Down

0 comments on commit 61204bd

Please sign in to comment.