From 33f135c0916399067a87c7701a8e14180f1a5ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 12 May 2017 15:40:09 -0400 Subject: [PATCH] closes #5675 --- src/database/mongo.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/database/mongo.js b/src/database/mongo.js index 273ec18001..80500c94ac 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -55,6 +55,8 @@ mongoModule.init = function (callback) { var usernamePassword = ''; if (nconf.get('mongo:username') && nconf.get('mongo:password')) { usernamePassword = nconf.get('mongo:username') + ':' + encodeURIComponent(nconf.get('mongo:password')) + '@'; + } else { + winston.warn('You have no mongo username/password setup!'); } // Sensible defaults for Mongo, if not set @@ -102,15 +104,7 @@ mongoModule.init = function (callback) { require('./mongo/sets')(db, mongoModule); require('./mongo/sorted')(db, mongoModule); require('./mongo/list')(db, mongoModule); - - if (nconf.get('mongo:password') && nconf.get('mongo:username')) { - db.authenticate(nconf.get('mongo:username'), nconf.get('mongo:password'), function (err) { - callback(err); - }); - } else { - winston.warn('You have no mongo password setup!'); - callback(); - } + callback(); }); };