Skip to content
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

Merged
merged 3 commits into from
Apr 4, 2017

Conversation

rodrigok
Copy link
Member

@rodrigok rodrigok commented Apr 4, 2017

@RocketChat/core

I removed the migration for Real Names cuz it takes hours to run on our demo, we are working to fix that.

@rodrigok rodrigok added this to the 0.55.0 milestone Apr 4, 2017
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6590 April 4, 2017 17:03 Inactive

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);
Copy link
Member

@sampaiodiego sampaiodiego Apr 4, 2017

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) {
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6590 April 4, 2017 17:56 Inactive
@engelgabriel engelgabriel merged commit a8a4673 into develop Apr 4, 2017
@engelgabriel engelgabriel deleted the hotfix/linkedin-names branch April 4, 2017 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants