exists function fix

This commit is contained in:
Baris Usakli
2013-05-07 16:21:25 -04:00
parent 283dbc477b
commit 8fe4905b68
2 changed files with 4 additions and 4 deletions

View File

@@ -299,14 +299,12 @@ var config = require('../config.js'),
}
User.exists = function(socket, username, callback) {
User.exists = function(username, callback) {
User.get_uid_by_username(username, function(exists) {
exists = !!exists;
if (callback)
callback(exists);
else
socket.emit('user.exists', {exists: exists});
});
};