dont let users with the same username/slug register closes #33

This commit is contained in:
Baris Usakli
2013-06-24 16:16:50 -04:00
parent 561ebea362
commit 51842a32da
3 changed files with 29 additions and 8 deletions

View File

@@ -147,7 +147,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
});
socket.on('user.exists', function(data) {
user.exists(data.username, function(exists){
user.exists(utils.slugify(data.username), function(exists){
socket.emit('user.exists', {exists: exists});
});
});