Skip to content

Commit

Permalink
revert to previous form and attempt to get working later
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Q Larson committed Dec 8, 2014
1 parent f1bedbd commit a067440
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions config/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ passport.deserializeUser(function(id, done) {
});
});

function sendWelcomeEmail(u) {
var transporter = nodemailer.createTransport({
service: 'Mandrill',
auth: {
user: secrets.mandrill.user,
pass: secrets.mandrill.password
}
});
var mailOptions = {
to: u.email,
from: '[email protected]',
subject: 'Welcome to Free Code Camp ' + u.name + '!',
text: 'Hello,\n\n' +
'Welcome to Free Code Camp!'
};
}
//function sendWelcomeEmail(u) {
// var transporter = nodemailer.createTransport({
// service: 'Mandrill',
// auth: {
// user: secrets.mandrill.user,
// pass: secrets.mandrill.password
// }
// });
// var mailOptions = {
// to: u.email,
// from: '[email protected]',
// subject: 'Welcome to Free Code Camp ' + u.name + '!',
// text: 'Hello,\n\n' +
// 'Welcome to Free Code Camp!'
// };
//}

/**
* OAuth Strategy Overview
Expand Down Expand Up @@ -279,9 +279,9 @@ passport.use(new GoogleStrategy(secrets.google, function(req, accessToken, refre
user.profile.name = user.profile.name || profile.displayName;
user.profile.gender = user.profile.gender || profile._json.gender;
user.profile.picture = user.profile.picture || profile._json.picture;
if (!existingEmailUser) {
sendWelcomeEmail(user);
}
//if (!existingEmailUser) {
// sendWelcomeEmail(user);
//}
user.save(function(err) {
done(err, user);
});
Expand Down

0 comments on commit a067440

Please sign in to comment.