From: Dan Brown Date: Mon, 14 Dec 2015 20:30:40 +0000 (+0000) Subject: Fixed issue with users that have no avatar X-Git-Tag: v0.6.0~2^2~4 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/123dc115837b2d82f1a93e54f180bf23444bfc17 Fixed issue with users that have no avatar --- diff --git a/app/User.php b/app/User.php index 12b502adc..1be98c3c4 100644 --- a/app/User.php +++ b/app/User.php @@ -145,7 +145,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon */ 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); }