diff --git a/lib/models/user.js b/lib/models/user.js index f3bd91f2..500f0cc0 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -257,7 +257,7 @@ User.setup = function () { UserModel.setter.password = function (plain) { var salt = bcrypt.genSaltSync(this.constructor.settings.saltWorkFactor || SALT_WORK_FACTOR); - this._password = bcrypt.hashSync(plain, salt); + this.$password = bcrypt.hashSync(plain, salt); } loopback.remoteMethod(