Existing username check now working, error box showing and hiding properly, UI tweaks
This commit is contained in:
@ -191,9 +191,11 @@ exports.checkUniqueUsername = function(req, res) {
|
||||
exports.checkExistingUsername = function(req, res) {
|
||||
User.count({'profile.username': req.params.username.toLowerCase()}, function (err, data) {
|
||||
if (data == 1) {
|
||||
return res.send(false);
|
||||
} else {
|
||||
debug('sending false back')
|
||||
return res.send(true);
|
||||
} else {
|
||||
debug('sending true back')
|
||||
return res.send(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user