mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
registration bugfix
This commit is contained in:
@@ -26,11 +26,11 @@ var RDB = require('../RedisDB.js');
|
|||||||
RDB.set('uid:' + uid + ':password', password);
|
RDB.set('uid:' + uid + ':password', password);
|
||||||
|
|
||||||
RDB.incr('user:count', function(count) {
|
RDB.incr('user:count', function(count) {
|
||||||
io.sockets.emit('user.count', {count: count});
|
global.io.sockets.emit('user.count', {count: count});
|
||||||
});
|
});
|
||||||
|
|
||||||
RDB.lpush('user:users', username);
|
RDB.lpush('user:users', username);
|
||||||
io.sockets.emit('user.latest', {username: username});
|
global.io.sockets.emit('user.latest', {username: username});
|
||||||
|
|
||||||
global.socket.emit('user.create', {'status': 1});
|
global.socket.emit('user.create', {'status': 1});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ var SocketIO = require('socket.io').listen(8081);
|
|||||||
(function(io) {
|
(function(io) {
|
||||||
var modules = null;
|
var modules = null;
|
||||||
|
|
||||||
|
global.io = io;
|
||||||
module.exports.init = function() {
|
module.exports.init = function() {
|
||||||
modules = global.modules;
|
modules = global.modules;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user