Merge branch 'develop' into bs3

Conflicts:
	views/options/social/tavern.jade
This commit is contained in:
Tyler Renelle 2014-02-07 23:41:14 -07:00
commit 313ec3d869
2 changed files with 3 additions and 3 deletions

View file

@ -108,14 +108,14 @@ api.loginLocal = function(req, res, next) {
if (!(username && password)) return res.json(401, {err:'Missing :username or :password in request body, please provide both'});
User.findOne({'auth.local.username': username}, function(err, user){
if (err) return next(err);
if (!user) return res.json(401, {err:"Username '" + username + "' not found. Usernames are case-sensitive, click 'Forgot Password' if you can't remember the capitalization."});
if (!user) return res.json(401, {err:"Username or password incorrect. Click 'Forgot Password' for help with either. (Note: usernames are case-sensitive)"});
// We needed the whole user object first so we can get his salt to encrypt password comparison
User.findOne({
'auth.local.username': username,
'auth.local.hashed_password': utils.encryptPassword(password, user.auth.local.salt)
}, function(err, user){
if (err) return next(err);
if (!user) return res.json(401,{err:'Incorrect password'});
if (!user) return res.json(401,{err:"Username or password incorrect. Click 'Forgot Password' for help with either. (Note: usernames are case-sensitive)"});
res.json({id: user._id,token: user.apiToken});
});
});

View file

@ -40,7 +40,7 @@
a(target='_blank', href='http://habitrpg.wikia.com/wiki/Glossary')=env.t('glossary')
tr
td
a(target='_blank', href='https://github.com/HabitRPG/habitrpg/issues')=env.t('reportAP')
a(target='_blank', href='https://github.com/HabitRPG/habitrpg/issues/2760')=env.t('reportAP')
tr
td
a(target='_blank', href='https://trello.com/c/8gzGlle8')=env.t('requestAF')