committing what I have for Nathan to continue

This commit is contained in:
Michael Q Larson
2015-01-09 18:09:49 -08:00
parent 3e7da5ae98
commit 02eb3b5914
3 changed files with 33 additions and 9 deletions

View File

@ -186,7 +186,9 @@ exports.checkUniqueUsername = function(req, res) {
*/
exports.checkUniqueEmail = function(req, res) {
User.count({'email': req.params.email.toLowerCase()}, function (err, data) {
console.log(req.params.email);
User.count({'email': decodeURIComponent(req.params.email).toLowerCase()}, function (err, data) {
console.log(User.findOne({'email': decodeURIComponent(req.params.email)}));
if (data == 1) {
return res.send(true);
} else {