First of all, great work on this module!

I'm really hoping I'm not being thick, but I'm finding the profile image is not being displayed except when the linked user is logged in. The debug message is

LinkedIn debug : Access denied to /linkedin/token/18.
Requesting user (uid 0) is different from the requested account (uid 18)

All other information is displaying fine.

Any help is greatly appreciated.

Comments

peterx’s picture

Same error. From what I can see, the first call is to linkedin/login/%user and that returns the user details. Linkedin returns to linkedin/token/%user and that returns and empty row. I guess it is an access error.

peterx’s picture

To make it work, I edited linkedin_token_access() and changed:

if ($account->uid > 0 && $account->uid == $user->uid) {
  return TRUE;
}

to:

$user = $account;
return TRUE;

This seemed like a security risk so I tried linkedin/token/1 and that failed. The jump to linkedin/token happens before the jump to LinkedIn. I tried a few more experiments. The "Login using LinkedIn" link, linkedin/login/0, appears to get the user id from a cookie and uses that without giving anyone a chance to log in as anyone else.

If you clear the cookies, you go back to the normal login. The normal login works without the code change mentioned above. The problem occurs on our site when the user id is picked up from the cookie.

greg.harvey’s picture

Category: support » bug

Can this be reproduced? Feels like a bug report.

nayanalok’s picture

Issue summary: View changes
StatusFileSize
new16.82 KB

Hi
May be profile image is not getting loaded from linkedin when user logs in for the first time.

Here is a patch which loads user's name, email address and profile picture from linkedIn.

nayanalok’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.