v1.18.x
barisusakli 9 years ago
parent 2b5f9d075b
commit 1e2779d326

@ -92,8 +92,6 @@ function registerAndLoginUser(req, res, userData, callback) {
user.deleteInvitation(userData.email); user.deleteInvitation(userData.email);
user.notifications.sendWelcomeNotification(uid);
plugins.fireHook('filter:register.complete', {uid: uid, referrer: req.body.referrer || nconf.get('relative_path') + '/'}, next); plugins.fireHook('filter:register.complete', {uid: uid, referrer: req.body.referrer || nconf.get('relative_path') + '/'}, next);
} }
], callback); ], callback);

@ -1,17 +1,16 @@
'use strict'; 'use strict';
var async = require('async'), var async = require('async');
nconf = require('nconf'), var request = require('request');
request = require('request'),
db = require('../database'), var db = require('../database');
meta = require('../meta'), var meta = require('../meta');
emailer = require('../emailer'), var emailer = require('../emailer');
notifications = require('../notifications'), var notifications = require('../notifications');
groups = require('../groups'), var groups = require('../groups');
translator = require('../../public/src/modules/translator'), var translator = require('../../public/src/modules/translator');
utils = require('../../public/src/utils'); var utils = require('../../public/src/utils');
module.exports = function(User) { module.exports = function(User) {
@ -90,9 +89,6 @@ module.exports = function(User) {
emailer.send('registration_accepted', uid, data, next); emailer.send('registration_accepted', uid, data, next);
}); });
}, },
function(next) {
User.notifications.sendWelcomeNotification(uid, next);
},
function(next) { function(next) {
removeFromQueue(username, next); removeFromQueue(username, next);
}, },

@ -98,6 +98,9 @@ module.exports = function(User) {
function(next) { function(next) {
groups.join('registered-users', userData.uid, next); groups.join('registered-users', userData.uid, next);
}, },
function(next) {
user.notifications.sendWelcomeNotification(uid, next);
},
function(next) { function(next) {
if (userData.email) { if (userData.email) {
async.parallel([ async.parallel([

Loading…
Cancel
Save