Committer: sbelyaev
LJSUP-11858: Vkontakte integrationU trunk/cgi-bin/LJ/Identity/Vkontakte.pm
Modified: trunk/cgi-bin/LJ/Identity/Vkontakte.pm =================================================================== --- trunk/cgi-bin/LJ/Identity/Vkontakte.pm 2012-04-25 09:19:28 UTC (rev 11787) +++ trunk/cgi-bin/LJ/Identity/Vkontakte.pm 2012-04-25 09:32:33 UTC (rev 11788) @@ -54,7 +54,12 @@ 'access_token' => $token, } ); - $userdata = (ref $res eq 'ARRAY') ? $res->[0] : $res; + $userdata = $res; + if ($res->{'response'}) { + $userdata = $res->{'response'}; + } + + $userdata = $userdata->[0]; } ## INITIALIZE USER PROFILE