Merge branch 'staging' of http://github.com/FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -11,10 +11,14 @@ module.exports = function(User) {
|
|||||||
// set salt factor for passwords
|
// set salt factor for passwords
|
||||||
User.settings.saltWorkFactor = 5;
|
User.settings.saltWorkFactor = 5;
|
||||||
|
|
||||||
//User.validatesExclusionOf('username', {
|
// username should not be in blacklist
|
||||||
// inArray: blacklistedUsernames,
|
User.validatesExclusionOf('username', {
|
||||||
// message: 'username is taken'
|
'in': blacklistedUsernames,
|
||||||
//});
|
message: 'is taken'
|
||||||
|
});
|
||||||
|
|
||||||
|
// username should be unique
|
||||||
|
User.validatesUniquenessOf('username');
|
||||||
|
|
||||||
debug('setting up user hooks');
|
debug('setting up user hooks');
|
||||||
// send verification email to new camper
|
// send verification email to new camper
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
"username": {
|
"username": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"lowercase": true,
|
"lowercase": true,
|
||||||
"trim": true
|
"trim": true,
|
||||||
|
"require": true
|
||||||
},
|
},
|
||||||
"bio": {
|
"bio": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
Reference in New Issue
Block a user