@ -44,8 +44,8 @@ define(function() {
} else {
socket.emit('api:user.emailExists', {
email: emailEl.val()
}, function(data) {
if (data.exists === true) {
}, function(exists) {
if (exists === true) {
showError(email_notify, 'Email address already taken!');
showSuccess(email_notify, successIcon);
@ -930,14 +930,7 @@ var bcrypt = require('bcrypt'),
},
exists: function(socket, email, callback) {
User.getUidByEmail(email, function(err, exists) {
exists = !! exists;
if (typeof callback !== 'function') {
socket.emit('user.email.exists', {
exists: exists
});
callback(exists);
}
callback(!!exists);
confirm: function(code, callback) {