]> BookStack Code Mirror - bookstack/commitdiff
Fixed issue with users that have no avatar
authorDan Brown <redacted>
Mon, 14 Dec 2015 20:30:40 +0000 (20:30 +0000)
committerDan Brown <redacted>
Mon, 14 Dec 2015 20:30:40 +0000 (20:30 +0000)
app/User.php

index 12b502adc7b62ac54c82d8f1b032e6ae20e263ac..1be98c3c46d86230b220574414acb863adf216d4 100644 (file)
@@ -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);
     }