Merge branch 'staging' of http://github.com/FreeCodeCamp/freecodecamp into staging

This commit is contained in:
terakilobyte
2015-06-12 21:10:18 -04:00
2 changed files with 10 additions and 5 deletions

View File

@ -11,10 +11,14 @@ module.exports = function(User) {
// set salt factor for passwords
User.settings.saltWorkFactor = 5;
//User.validatesExclusionOf('username', {
// inArray: blacklistedUsernames,
// message: 'username is taken'
//});
// username should not be in blacklist
User.validatesExclusionOf('username', {
'in': blacklistedUsernames,
message: 'is taken'
});
// username should be unique
User.validatesUniquenessOf('username');
debug('setting up user hooks');
// send verification email to new camper

View File

@ -44,7 +44,8 @@
"username": {
"type": "string",
"lowercase": true,
"trim": true
"trim": true,
"require": true
},
"bio": {
"type": "string",