Skip to content

Commit f668fdc

Browse files
committed
fix(app): fixed jshint warning in user model
1 parent 7d68cc9 commit f668fdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: templates/express/models/user.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ UserSchema
3838
.set(function(password) {
3939
this._password = password;
4040
this.salt = this.makeSalt();
41-
this.hashedPassword = this.encryptPassword(password, this.salt);
41+
this.hashedPassword = this.encryptPassword(password);
4242
})
4343
.get(function() {
4444
return this._password;
@@ -120,7 +120,7 @@ UserSchema.methods = {
120120
* @api public
121121
*/
122122
authenticate: function(plainText) {
123-
return this.encryptPassword(plainText, this.salt) === this.hashedPassword;
123+
return this.encryptPassword(plainText) === this.hashedPassword;
124124
},
125125

126126
/**
@@ -140,7 +140,7 @@ UserSchema.methods = {
140140
* @return {String}
141141
* @api public
142142
*/
143-
encryptPassword: function(password, salt) {
143+
encryptPassword: function(password) {
144144
if (!password || !this.salt) return '';
145145
var salt = new Buffer(this.salt, 'base64');
146146
return crypto.pbkdf2Sync(password, salt, 10000, 64).toString('base64');

0 commit comments

Comments
 (0)