Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #62 from HackIllinois/staging
Browse files Browse the repository at this point in the history
Password Generation Fix
  • Loading branch information
nmagerko committed Jan 29, 2017
2 parents 7ea8d82 + 0b2086e commit 7b078be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1/services/UserService.js
Expand Up @@ -19,7 +19,7 @@ var utils = require('../utils');
module.exports.createUser = function (email, password, role) {

email = email.toLowerCase();
var storedPassword = (storedPassword) ? storedPassword : utils.crypto.generatePassword();
var storedPassword = (password) ? password : utils.crypto.generatePassword();
var user = User.forge({ email: email, password: storedPassword });
return user
.validate()
Expand All @@ -40,7 +40,7 @@ module.exports.createUser = function (email, password, role) {
// TODO: send user an email requiring a password reset when
// the password is automatically generated
}

return _Promise.resolve(result);
});
};
Expand Down

0 comments on commit 7b078be

Please sign in to comment.