-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Accounts from LinkedIn OAuth without name #6590
Conversation
server/startup/migrations/v091.js
Outdated
|
||
RocketChat.models.Users.find(query, {'services.linkedin.firstName': 1, username: 1}).forEach((user) => { | ||
const name = `${ user.services.linkedin.firstName } ${ user.services.linkedin.lastName }`; | ||
console.log(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this console.log
can be removed =)
if (options.profile) { | ||
if (options.profile.name) { | ||
user.name = options.profile.name; | ||
} else if (options.profile.firstName && options.profile.lastName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it happen to have the firstName
but not the lastName
?
If so, it would be better to split the if
in two so the user will got at least the firstName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non of our 500+ cases had only firstName, but I'll change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@RocketChat/core
I removed the migration for Real Names cuz it takes hours to run on our demo, we are working to fix that.