forked from freeCodeCamp/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert to previous form and attempt to get working later
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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); | ||
}); | ||
|