v1.18.x
psychobunny 9 years ago
commit 086289528f

@ -259,7 +259,6 @@ middleware.busyCheck = function(req, res, next) {
middleware.applyBlacklist = function(req, res, next) { middleware.applyBlacklist = function(req, res, next) {
meta.blacklist.test(req.ip, function(err) { meta.blacklist.test(req.ip, function(err) {
console.log('blacklist returned:', err);
next(err); next(err);
}); });
}; };

@ -1,14 +1,13 @@
'use strict'; 'use strict';
var async = require('async'), var async = require('async');
db = require('../database'), var db = require('../database');
utils = require('../../public/src/utils'), var utils = require('../../public/src/utils');
validator = require('validator'), var validator = require('validator');
plugins = require('../plugins'), var plugins = require('../plugins');
groups = require('../groups'), var groups = require('../groups');
meta = require('../meta'), var meta = require('../meta');
notifications = require('../notifications'),
translator = require('../../public/src/modules/translator');
module.exports = function(User) { module.exports = function(User) {
@ -90,7 +89,11 @@ module.exports = function(User) {
db.sortedSetAdd('userslug:uid', userData.uid, userData.userslug, next); db.sortedSetAdd('userslug:uid', userData.uid, userData.userslug, next);
}, },
function(next) { function(next) {
db.sortedSetsAdd(['users:joindate', 'users:online', 'users:notvalidated'], timestamp, userData.uid, next); var sets = ['users:joindate', 'users:online'];
if (parseInt(userData.uid) !== 1) {
sets.push('users:notvalidated');
}
db.sortedSetsAdd(sets, timestamp, userData.uid, next);
}, },
function(next) { function(next) {
db.sortedSetsAdd(['users:postcount', 'users:reputation'], 0, userData.uid, next); db.sortedSetsAdd(['users:postcount', 'users:reputation'], 0, userData.uid, next);
@ -176,7 +179,7 @@ module.exports = function(User) {
next(); next();
} }
} }
}, function(err, results) { }, function(err) {
callback(err); callback(err);
}); });
}; };

Loading…
Cancel
Save