diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-09-17 15:53:03 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-09-17 15:53:03 +0300 |
commit | eb8c1530a5363f4e2fac42860b883038d8565d33 (patch) | |
tree | 74f3fb2e544f4b5a7f237c10e92fc222eb622fcb /models/users.js | |
parent | 70623df8990e4a1068a69f702907ea8d85f634ad (diff) | |
download | wekan-eb8c1530a5363f4e2fac42860b883038d8565d33.tar.gz wekan-eb8c1530a5363f4e2fac42860b883038d8565d33.tar.bz2 wekan-eb8c1530a5363f4e2fac42860b883038d8565d33.zip |
Fix lint errors.
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/models/users.js b/models/users.js index 070cbc40..07a3f75c 100644 --- a/models/users.js +++ b/models/users.js @@ -488,29 +488,29 @@ if (Meteor.isServer) { return user; } -// if (user.services.oidc) { -// const email = user.services.oidc.email.toLowerCase(); -// -// user.username = user.services.oidc.username; -// user.emails = [{ address: email, verified: true }]; -// const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase(); -// user.profile = { initials, fullname: user.services.oidc.fullname }; -// -// // see if any existing user has this email address or username, otherwise create new -// const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]}); -// if (!existingUser) -// return user; -// -// // copy across new service info -// const service = _.keys(user.services)[0]; -// existingUser.services[service] = user.services[service]; -// existingUser.emails = user.emails; -// existingUser.username = user.username; -// existingUser.profile = user.profile; -// -// Meteor.users.remove({_id: existingUser._id}); // remove existing record -// return existingUser; -// } + // if (user.services.oidc) { + // const email = user.services.oidc.email.toLowerCase(); + // + // user.username = user.services.oidc.username; + // user.emails = [{ address: email, verified: true }]; + // const initials = user.services.oidc.fullname.match(/\b[a-zA-Z]/g).join('').toUpperCase(); + // user.profile = { initials, fullname: user.services.oidc.fullname }; + // + // // see if any existing user has this email address or username, otherwise create new + // const existingUser = Meteor.users.findOne({$or: [{'emails.address': email}, {'username':user.username}]}); + // if (!existingUser) + // return user; + // + // // copy across new service info + // const service = _.keys(user.services)[0]; + // existingUser.services[service] = user.services[service]; + // existingUser.emails = user.emails; + // existingUser.username = user.username; + // existingUser.profile = user.profile; + // + // Meteor.users.remove({_id: existingUser._id}); // remove existing record + // return existingUser; + // } if (options.from === 'admin') { user.createdThroughApi = true; |