Merge branch 'develop' into static-page-merch
This commit is contained in:
@@ -156,7 +156,7 @@ api.loginLocal = function(req, res, next) {
|
||||
|
||||
User.findOne(login, {auth:1}, function(err, user){
|
||||
if (err) return next(err);
|
||||
if (!user) return res.json(401, {err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\"."});
|
||||
if (!user) return res.json(401, {err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\" on the habitica.com website's login form."});
|
||||
if (user.auth.blocked) return res.json(401, accountSuspended(user._id));
|
||||
// We needed the whole user object first so we can get his salt to encrypt password comparison
|
||||
User.findOne(
|
||||
@@ -164,7 +164,7 @@ api.loginLocal = function(req, res, next) {
|
||||
, {_id:1, apiToken:1}
|
||||
, function(err, user){
|
||||
if (err) return next(err);
|
||||
if (!user) return res.json(401,{err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\"."});
|
||||
if (!user) return res.json(401,{err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\" on the habitica.com website's login form."});
|
||||
res.json({id: user._id,token: user.apiToken});
|
||||
password = null;
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@ exports.androidVerify = function(req, res, next) {
|
||||
data: googleRes
|
||||
};
|
||||
|
||||
payments.buyGems({user:user, paymentMethod:'IAP GooglePlay'});
|
||||
payments.buyGems({user:user, paymentMethod:'IAP GooglePlay', amount: 5.25});
|
||||
|
||||
return res.json(resObj);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,6 @@ var UserSchema = new Schema({
|
||||
tavern: {type: Boolean, 'default': false},
|
||||
equipment: {type: Boolean, 'default': false},
|
||||
items: {type: Boolean, 'default': false},
|
||||
inviteParty: {type: Boolean, 'default': false},
|
||||
},
|
||||
ios: {
|
||||
addTask: {type: Boolean, 'default': false},
|
||||
@@ -586,7 +585,7 @@ UserSchema.methods.unlink = function(options, cb) {
|
||||
function _populateDefaultsForNewUser(user) {
|
||||
var taskTypes;
|
||||
|
||||
if (user.registeredThrough === "habitica-web") {
|
||||
if (user.registeredThrough === "habitica-web" || user.registeredThrough === "habitica-android") {
|
||||
taskTypes = ['habits', 'dailys', 'todos', 'rewards', 'tags'];
|
||||
|
||||
var tutorialCommonSections = [
|
||||
|
||||
Reference in New Issue
Block a user