add user.isGithubCool check

if user signs up with github, they become GithubCool.
This commit is contained in:
Berkeley Martinez
2015-08-04 13:39:59 -07:00
parent ce0b3b35c0
commit 2dc9934da2
2 changed files with 7 additions and 39 deletions

View File

@ -19,28 +19,14 @@
"password": {
"type": "string"
},
"facebook": {
"type": "string"
},
"twitter": {
"type": "string"
},
"google": {
"type": "string"
},
"github": {
"type": "string"
},
"linkedin": {
"type": "string"
},
"tokens": {
"type": "array"
},
"progressTimestamps": {
"type": "array",
"default": []
},
"isGithubCool": {
"type": "boolean",
"default": false
},
"username": {
"type": "string",
"lowercase": true,
@ -123,12 +109,6 @@
"type": "string",
"default": ""
},
"resetPasswordToken": {
"type": "string"
},
"resetPasswordExpires": {
"type": "string"
},
"completedBonfires": {
"type": [
{
@ -170,21 +150,10 @@
"type": "number",
"default": 0
},
"needsSomeDataModeled": {
"type": "boolean",
"default": false
},
"needsMigration": {
"type": "boolean",
"default": true
},
"sendMonthlyEmail": {
"type": "boolean",
"default": true
},
"challengesHash": {
"type": {}
},
"currentChallenge": {
"type": {}
},
@ -205,10 +174,6 @@
}
],
"default": []
},
"uncompletedChallenges": {
"type": "array",
"default": []
}
},
"validations": [],

View File

@ -65,6 +65,9 @@ var passportOptions = {
if (email) {
userObj.email = email;
}
if (provider === 'github-login') {
userObj.isGithubCool = true;
}
return userObj;
}
};