Closed krasi-georgiev closed 9 years ago
I don't think this proposed solution is appropriate.
toArray
method is intended to provide you with the raw payload of the original response.getUrls
accessor method to return an incorrect result.Is there another way to get this properly coded ?
You can retrieve the user's information using the opinions in this package by doing the following:
$user = $provider->getResourceOwner($token);
echo $user->getId();
echo $user->getEmail();
echo $user->getFirstname();
echo $user->getLastname();
echo $user->getImageurl();
echo $user->getName();
echo $user->getUrls();
or you can get the raw data that was returned from the API request and process it within your project
$user = $provider->getResourceOwner($token);
print_r($user->toArray());
If you would like to contribute to the resource owner object and improve the accessor methods it provides, that is just fine so long as the accessor methods do not change the underlying array, as you previously requested.
… the correct link