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

This commit is contained in:
Quincy Larson
2015-08-12 21:25:11 -07:00
2 changed files with 9 additions and 5 deletions

View File

@ -32,7 +32,7 @@
"difficulty": 0.35,
"challengeSeed": ["114684727"],
"description": [
"Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will can alter the behavior of DOM elements based on the directives you've used.",
"Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will alter the behavior of DOM elements based on the directives you've used.",
"Let's learn how these powerful directives work, and how to use them to make your web apps more dynamic",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1</a> and complete the section."
],

View File

@ -86,15 +86,19 @@ var users = dbObservable
.map(function(user) {
// flatten user
assign(user, user.portfolio, user.profile);
if (user.username) {
return user;
if (!user.username) {
user.username = 'fcc' + uuid.v4().slice(0, 8);
}
user.username = 'fcc' + uuid.v4().slice(0, 8);
if (user.github) {
user.isGithubCool = true;
} else {
user.isMigrationGrandfathered = true;
}
providers.forEach(function(provider) {
user[provider + 'id'] = user[provider];
user[provider] = null;
});
return user;
})
.shareReplay();
@ -123,7 +127,7 @@ var userIdentityCount = users
.map(function(provider) {
return {
provider: provider,
externalId: user[provider],
externalId: user[provider + 'id'],
userId: user._id || user.id
};
})