Skip to content

Node.js based forum software built for the modern web

closes #6182

Barış Soner Uşaklı23dbb42130a4
diff --git a/src/socket.io/user/ban.js b/src/socket.io/user/ban.js
index a61a9b83ee..66f98eb061 100644
--- a/src/socket.io/user/ban.js
+++ b/src/socket.io/user/ban.js
@@ -1,6 +1,7 @@
'use strict';
var async = require('async');
+var winston = require('winston');
var user = require('../../user');
var meta = require('../../meta');
@@ -112,7 +113,12 @@ module.exports = function (SocketUser) {
reason: reason,
};
- emailer.send('banned', uid, data, next);
+ emailer.send('banned', uid, data, function (err) {
+ if (err) {
+ winston.error('[emailer.send] ' + err.message);
+ }
+ next();
+ });
},
function (next) {
user.ban(uid, until, reason, next);