mirror of
https://github.com/getgrav/grav.git
synced 2026-03-06 12:31:53 +01:00
Merge branch '1.6' of https://github.com/getgrav/grav into feature/1.6-controller
# Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
* Added `Page::httpResponseCode()` and `Page::httpHeaders()` methods
|
||||
1. [](#improved)
|
||||
* Added apcu autoloader optimization
|
||||
1. [](#bugfix)
|
||||
* Use login provider User avatar if set
|
||||
* Updated Grav `Processor` classes to implement PSR-15 `MiddlewareInterface`
|
||||
|
||||
# v1.6.0-beta.3
|
||||
|
||||
@@ -282,6 +282,13 @@ class User extends Data
|
||||
$avatar = $this->avatar;
|
||||
$avatar = array_shift($avatar);
|
||||
return Grav::instance()['base_url'] . '/' . $avatar['path'];
|
||||
} elseif ($this->provider) {
|
||||
$provider = $this->provider;
|
||||
if (isset($this->$provider['avatar_url'])) {
|
||||
return $this->$provider['avatar_url'];
|
||||
} elseif (isset($this->$provider['avatar'])) {
|
||||
return $this->$provider['avatar'];
|
||||
}
|
||||
}
|
||||
|
||||
return 'https://www.gravatar.com/avatar/' . md5($this->email);
|
||||
|
||||
Reference in New Issue
Block a user