mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fix for avatar_url provided by 3rd party providers
This commit is contained in:
parent
f30334d80f
commit
4d6db5b334
|
|
@ -7,6 +7,7 @@
|
|||
1. [](#bugfix)
|
||||
* Fixed `$grav['route']` from being modified when the route instance gets modified
|
||||
* Fixed Assets options array mixed with standalone priority [#2477](https://github.com/getgrav/grav/issues/2477)
|
||||
* Fix for `avatar_url` provided by 3rd party providers
|
||||
|
||||
# v1.6.8
|
||||
## 04/23/2019
|
||||
|
|
|
|||
|
|
@ -148,12 +148,13 @@ trait UserTrait
|
|||
|
||||
// Try looking for provider.
|
||||
$provider = $this->get('provider');
|
||||
if (\is_array($provider)) {
|
||||
if (isset($provider['avatar_url']) && \is_string($provider['avatar_url'])) {
|
||||
return $provider['avatar_url'];
|
||||
$provider_options = $this->get($provider);
|
||||
if (\is_array($provider_options)) {
|
||||
if (isset($provider_options['avatar_url']) && \is_string($provider_options['avatar_url'])) {
|
||||
return $provider_options['avatar_url'];
|
||||
}
|
||||
if (isset($provider['avatar']) && \is_string($provider['avatar'])) {
|
||||
return $provider['avatar'];
|
||||
if (isset($provider_options['avatar']) && \is_string($provider_options['avatar'])) {
|
||||
return $provider_options['avatar'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user