return newUser as true for new local accounts

This commit is contained in:
Phillip Thelen 2017-04-05 22:20:08 +02:00
parent a3dd2f497e
commit 8d168a0318

View file

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