add @rybar's new placeholder camper image and fix the broken logic that was supposed to update it for existing users

This commit is contained in:
Michael Q Larson
2015-03-11 23:58:16 -07:00
parent 3004c64ee7
commit 8e8711d947
4 changed files with 6 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ passport.use(new FacebookStrategy(secrets.facebook, function(req, accessToken, r
user.tokens.push({ kind: 'facebook', accessToken: accessToken });
user.profile.name = user.profile.name || profile.displayName;
user.profile.gender = user.profile.gender || profile._json.gender;
user.profile.picture = user.profile.picture || 'https://s3.amazonaws.com/freecodecamp/favicons/apple-touch-icon-180x180.png';
user.profile.picture = user.profile.picture || 'https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png';
user.save(function(err) {
req.flash('info', { msg: 'Facebook account has been linked.' });
done(err, user);