mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 07:57:43 +02:00
Fixed avatar image with flex user
This commit is contained in:
@@ -652,12 +652,12 @@ class Admin
|
||||
$data[$type] = $obj;
|
||||
} elseif (preg_match('|users/|', $type)) {
|
||||
$obj = User::load(preg_replace('|users/|', '', $type));
|
||||
$obj->merge($this->cleanUserPost($post));
|
||||
$obj->update($this->cleanUserPost($post));
|
||||
|
||||
$data[$type] = $obj;
|
||||
} elseif (preg_match('|user/|', $type)) {
|
||||
$obj = User::load(preg_replace('|user/|', '', $type));
|
||||
$obj->merge($this->cleanUserPost($post));
|
||||
$obj->update($this->cleanUserPost($post));
|
||||
|
||||
$data[$type] = $obj;
|
||||
} elseif (preg_match('|config/|', $type)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if data.avatar %}
|
||||
<label><img src="{{ base_url_simple ~ '/' ~ (data.avatar|first).path }}" /></label>
|
||||
<label><img src="{{ data.avatarUrl }}" /></label>
|
||||
{% else %}
|
||||
<label><img referrerpolicy="no-referrer" src="https://www.gravatar.com/avatar/{{ data.email|md5 }}?s=200" /></label>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user