From 57ccbd606c73f63113d7273d724743ede50682bb Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 21 Mar 2016 16:07:59 +0200 Subject: [PATCH] closes #4391 --- src/user/create.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/user/create.js b/src/user/create.js index 1d1543e863..ae69f1ad5d 100644 --- a/src/user/create.js +++ b/src/user/create.js @@ -1,14 +1,13 @@ 'use strict'; -var async = require('async'), - db = require('../database'), - utils = require('../../public/src/utils'), - validator = require('validator'), - plugins = require('../plugins'), - groups = require('../groups'), - meta = require('../meta'), - notifications = require('../notifications'), - translator = require('../../public/src/modules/translator'); +var async = require('async'); +var db = require('../database'); +var utils = require('../../public/src/utils'); +var validator = require('validator'); +var plugins = require('../plugins'); +var groups = require('../groups'); +var meta = require('../meta'); + module.exports = function(User) { @@ -90,7 +89,11 @@ module.exports = function(User) { db.sortedSetAdd('userslug:uid', userData.uid, userData.userslug, 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) { db.sortedSetsAdd(['users:postcount', 'users:reputation'], 0, userData.uid, next); @@ -176,7 +179,7 @@ module.exports = function(User) { next(); } } - }, function(err, results) { + }, function(err) { callback(err); }); };