fixed email exists error... weird.

v1.18.x
Julian Lam 11 years ago
parent 98e4257939
commit 3da96faa12

@ -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!');
} else {
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
});
} else {
callback(exists);
}
callback(!!exists);
});
},
confirm: function(code, callback) {

Loading…
Cancel
Save