mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
Porting change from #8053 to master
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
001e721530
commit
d14ab7e3e1
|
@ -324,9 +324,14 @@ class UserPresenter extends Presenter
|
|||
return config('app.url').'/uploads/avatars/'.$this->avatar;
|
||||
}
|
||||
|
||||
if ((Setting::getSettings()->load_remote=='1') && ($this->email!='')) {
|
||||
$gravatar = md5(strtolower(trim($this->email)));
|
||||
return "//gravatar.com/avatar/".$gravatar;
|
||||
if (Setting::getSettings()->load_remote=='1') {
|
||||
if ($this->model->gravatar!='') {
|
||||
$gravatar = md5(strtolower(trim($this->model->gravatar)));
|
||||
return "//gravatar.com/avatar/".$gravatar;
|
||||
} elseif ($this->email!='') {
|
||||
$gravatar = md5(strtolower(trim($this->email)));
|
||||
return "//gravatar.com/avatar/".$gravatar;
|
||||
}
|
||||
}
|
||||
|
||||
// Set a fun, gender-neutral default icon
|
||||
|
|
Loading…
Reference in a new issue