mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Fixed issue with users that have no avatar
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user