Fixed issue with users that have no avatar
This commit is contained in:
parent
93223fcd3d
commit
123dc11583
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||||
*/
|
*/
|
||||||
public function getAvatar($size = 50)
|
public function getAvatar($size = 50)
|
||||||
{
|
{
|
||||||
if ($this->image_id === 0 || $this->image_id === null) return '/user_avatar.png';
|
if ($this->image_id === 0 || $this->image_id === '0' || $this->image_id === null) return '/user_avatar.png';
|
||||||
return $this->avatar->getThumb($size, $size, false);
|
return $this->avatar->getThumb($size, $size, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue