fix an issue of bonfire not lowercasing input from the user when accepting a pairedWith username

This commit is contained in:
Michael Q Larson
2015-02-20 00:13:07 -08:00
parent efacacff79
commit 174ed6122b

View File

@ -222,7 +222,7 @@ exports.completedBonfire = function (req, res) {
var isSolution = req.body.bonfireInfo.solution;
if (isCompletedWith) {
var paired = User.find({"profile.username": isCompletedWith}).limit(1);
var paired = User.find({"profile.username": isCompletedWith.toLowerCase()}).limit(1);
paired.exec(function (err, pairedWith) {
if (err) {
return err;