Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loopback user password setter overwrite

UserModel.setter.password = function(plain) {
	//var salt = bcrypt.genSaltSync(this.constructor.settings.saltWorkFactor || SALT_WORK_FACTOR);
	//this.$password = bcrypt.hashSync(plain, salt);
	this.$password = plain;
};
 
PREVIOUS NEXT
Tagged: #loopback #user #password #setter #overwrite
ADD COMMENT
Topic
Name
9+4 =