@ -44,7 +44,11 @@ define(function() {
} else {
socket.emit('user.emailExists', {
email: emailEl.val()
}, function(exists) {
}, function(err, exists) {
if(err) {
return app.alertError(err.message);
}
if (exists) {
showError(email_notify, 'Email address already taken!');
@ -15,6 +15,7 @@ var groups = require('../groups'),
async = require('async'),
winston = require('winston'),
index = require('./index'),
SocketAdmin = {};
@ -252,7 +253,7 @@ SocketAdmin.config.set = function(socket, data, callback) {
});
logger.monitorConfig({io: socket.server}, data);
logger.monitorConfig({io: index.server}, data);
};
@ -933,7 +933,7 @@ var bcrypt = require('bcrypt'),
},
exists: function(email, callback) {
User.getUidByEmail(email, function(err, exists) {
callback(!!exists);
callback(err, !!exists);
confirm: function(code, callback) {