mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-16 00:50:28 +01:00
fix(core): upgrade conflict
This commit is contained in:
@@ -155,36 +155,6 @@ exports.saveOAuthUserProfile = function (req, providerUserProfile, done) {
|
||||
$or: [mainProviderSearchQuery, additionalProviderSearchQuery]
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
User.findOne(searchQuery, function (err, user) {
|
||||
if (err) {
|
||||
return done(err);
|
||||
} else {
|
||||
if (!user) {
|
||||
var possibleUsername = providerUserProfile.username || ((providerUserProfile.email) ? providerUserProfile.email.split('@')[0] : '');
|
||||
|
||||
User.findUniqueUsername(possibleUsername, null, function (availableUsername) {
|
||||
user = new User({
|
||||
firstName: providerUserProfile.firstName,
|
||||
lastName: providerUserProfile.lastName,
|
||||
username: availableUsername,
|
||||
displayName: providerUserProfile.displayName,
|
||||
profileImageURL: providerUserProfile.profileImageURL,
|
||||
provider: providerUserProfile.provider,
|
||||
providerData: providerUserProfile.providerData
|
||||
});
|
||||
|
||||
// Email intentionally added later to allow defaults (sparse settings) to be applid.
|
||||
// Handles case where no email is supplied.
|
||||
// See comment: https://github.com/meanjs/mean/pull/1495#issuecomment-246090193
|
||||
user.email = providerUserProfile.email;
|
||||
user.passkey = user.randomAsciiString(32);
|
||||
|
||||
// And save the user
|
||||
user.save(function (err) {
|
||||
return done(err, user, info);
|
||||
});
|
||||
=======
|
||||
// Find existing user with this provider account
|
||||
User.findOne(searchQuery, function (err, existingUser) {
|
||||
if (err) {
|
||||
@@ -204,13 +174,13 @@ exports.saveOAuthUserProfile = function (req, providerUserProfile, done) {
|
||||
profileImageURL: providerUserProfile.profileImageURL,
|
||||
provider: providerUserProfile.provider,
|
||||
providerData: providerUserProfile.providerData
|
||||
>>>>>>> 8f50eecc7c1ec7dda3363093b3b3e7f17ca9a692
|
||||
});
|
||||
|
||||
// Email intentionally added later to allow defaults (sparse settings) to be applid.
|
||||
// Handles case where no email is supplied.
|
||||
// See comment: https://github.com/meanjs/mean/pull/1495#issuecomment-246090193
|
||||
user.email = providerUserProfile.email;
|
||||
user.passkey = user.randomAsciiString(32);
|
||||
|
||||
// And save the user
|
||||
user.save(function (err) {
|
||||
|
||||
15
package.json
15
package.json
@@ -55,23 +55,14 @@
|
||||
"jasmine-core": "~2.5.2",
|
||||
"lodash": "~4.17.4",
|
||||
"lusca": "~1.4.1",
|
||||
<<<<<<< HEAD
|
||||
"method-override": "~2.3.5",
|
||||
"mocha": "~3.1.0",
|
||||
"mongoose": "^4.9.5",
|
||||
"morgan": "~1.7.0",
|
||||
"moviedb": "^0.2.8",
|
||||
"multer": "~1.2.0",
|
||||
"nodemailer": "~2.6.4",
|
||||
"nt": "^0.5.3",
|
||||
=======
|
||||
"method-override": "~2.3.8",
|
||||
"mocha": "~3.2.0",
|
||||
"mongoose": "~4.10.2",
|
||||
"morgan": "~1.8.1",
|
||||
"moviedb": "^0.2.8",
|
||||
"multer": "~1.3.0",
|
||||
"nodemailer": "~4.0.1",
|
||||
>>>>>>> 8f50eecc7c1ec7dda3363093b3b3e7f17ca9a692
|
||||
"nodemailer": "~2.6.4",
|
||||
"nt": "^0.5.3",
|
||||
"owasp-password-strength-test": "~1.3.0",
|
||||
"passport": "~0.3.2",
|
||||
"passport-facebook": "~2.1.1",
|
||||
|
||||
Reference in New Issue
Block a user