fixed password update

This commit is contained in:
Andris Reinman 2017-12-20 15:17:34 +02:00
parent e6bdfadac2
commit 9d3453d645
3 changed files with 12 additions and 15 deletions

View file

@ -36,21 +36,21 @@ module.exports.connect = callback => {
return callback(err); return callback(err);
} }
module.exports.database = db; module.exports.database = db;
getDBConnection(db, config.dbs.gridfs, (err, db) => { getDBConnection(db, config.dbs.gridfs, (err, gdb) => {
if (err) { if (err) {
return callback(err); return callback(err);
} }
module.exports.gridfs = db; module.exports.gridfs = gdb;
getDBConnection(db, config.dbs.users, (err, db) => { getDBConnection(db, config.dbs.users, (err, udb) => {
if (err) { if (err) {
return callback(err); return callback(err);
} }
module.exports.users = db; module.exports.users = udb;
getDBConnection(db, config.dbs.sender, (err, db) => { getDBConnection(db, config.dbs.sender, (err, sdb) => {
if (err) { if (err) {
return callback(err); return callback(err);
} }
module.exports.senderDb = db; module.exports.senderDb = sdb;
module.exports.redisConfig = tools.redisConfig(config.dbs.redis); module.exports.redisConfig = tools.redisConfig(config.dbs.redis);
module.exports.redis = new Redis(module.exports.redisConfig); module.exports.redis = new Redis(module.exports.redisConfig);

View file

@ -1840,7 +1840,7 @@ class UserHandler {
$set.unameview = $set.username.replace(/\./g, ''); $set.unameview = $set.username.replace(/\./g, '');
} }
if (!updates) { if (!updates && !passwordChanged) {
return callback(new Error('Nothing was updated')); return callback(new Error('Nothing was updated'));
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "wildduck", "name": "wildduck",
"version": "1.0.94", "version": "1.0.95",
"description": "IMAP server built with Node.js and MongoDB", "description": "IMAP server built with Node.js and MongoDB",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
@ -8,10 +8,7 @@
"test": "mongo --eval 'db.dropDatabase()' wildduck-test && redis-cli -n 13 flushdb && NODE_ENV=test grunt", "test": "mongo --eval 'db.dropDatabase()' wildduck-test && redis-cli -n 13 flushdb && NODE_ENV=test grunt",
"apidoc": "apidoc -i lib/api/ -o docs/" "apidoc": "apidoc -i lib/api/ -o docs/"
}, },
"keywords": [ "keywords": ["imap", "mail server"],
"imap",
"mail server"
],
"author": "Andris Reinman", "author": "Andris Reinman",
"license": "EUPL-1.1", "license": "EUPL-1.1",
"devDependencies": { "devDependencies": {
@ -49,12 +46,12 @@
"libmime": "3.1.0", "libmime": "3.1.0",
"libqp": "1.1.0", "libqp": "1.1.0",
"linkify-it": "2.0.3", "linkify-it": "2.0.3",
"mailsplit": "4.0.2", "mailsplit": "4.1.1",
"mobileconfig": "2.1.0", "mobileconfig": "2.1.0",
"mongo-cursor-pagination-node6": "5.0.0", "mongo-cursor-pagination-node6": "5.0.0",
"mongodb": "2.2.33", "mongodb": "3.0.0-rc0",
"mongodb-extended-json": "^1.10.0", "mongodb-extended-json": "^1.10.0",
"nodemailer": "4.4.0", "nodemailer": "4.4.1",
"npmlog": "4.1.2", "npmlog": "4.1.2",
"openpgp": "2.6.0", "openpgp": "2.6.0",
"qrcode": "1.0.0", "qrcode": "1.0.0",