Merge pull request #228 from 1day2die/discord_avatar
Fixed error with discord pics not loading
This commit is contained in:
commit
e8a4f3d97f
|
@ -214,12 +214,17 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
public function getAvatar()
|
||||
{
|
||||
if ($this->discordUser()->exists()) {
|
||||
if(@getimagesize($this->discordUser->getAvatar())) {
|
||||
$avatar = $this->discordUser->getAvatar();
|
||||
} else {
|
||||
$avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
}
|
||||
} else {
|
||||
$avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
|
||||
}
|
||||
|
||||
return $avatar;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue