added password confirmation to automated setup

v1.18.x
Julian Lam 11 years ago
parent d2927e2be2
commit 535379d9d7

@ -63,13 +63,14 @@ var async = require('async'),
} }
if (setupVal && setupVal instanceof Object) { if (setupVal && setupVal instanceof Object) {
if (setupVal['admin:username'] && setupVal['admin:password'] && setupVal['admin:email']) { if (setupVal['admin:username'] && setupVal['admin:password'] && setupVal['admin:password:confirm'] && setupVal['admin:email']) {
install.values = setupVal; install.values = setupVal;
next(); next();
} else { } else {
winston.error('Required values are missing for automated setup:'); winston.error('Required values are missing for automated setup:');
if (!setupVal['admin:username']) winston.error(' admin:username'); if (!setupVal['admin:username']) winston.error(' admin:username');
if (!setupVal['admin:password']) winston.error(' admin:password'); if (!setupVal['admin:password']) winston.error(' admin:password');
if (!setupVal['admin:password:confirm']) winston.error(' admin:password:confirm');
if (!setupVal['admin:email']) winston.error(' admin:email'); if (!setupVal['admin:email']) winston.error(' admin:email');
process.exit(); process.exit();
} }
@ -345,7 +346,8 @@ var async = require('async'),
var results = { var results = {
username: install.values['admin:username'], username: install.values['admin:username'],
email: install.values['admin:email'], email: install.values['admin:email'],
password: install.values['admin:password'] password: install.values['admin:password'],
'password:confirm': install.values['admin:password:confirm']
}; };
success(null, results); success(null, results);

Loading…
Cancel
Save