allow flow through to passwordPolicy in case of empty ('') password (#3560)

This commit is contained in:
Bhaskar Reddy Yasa
2017-02-24 17:51:50 +05:30
committed by Florent Vilmart
parent 41358d2226
commit 0e900cbefd
2 changed files with 23 additions and 1 deletions

View File

@@ -366,7 +366,7 @@ RestWrite.prototype.transformUser = function() {
return promise.then(() => {
// Transform the password
if (!this.data.password) {
if (this.data.password === undefined) { // ignore only if undefined. should proceed if empty ('')
return Promise.resolve();
}