Fixed issue with users that have no avatar

This commit is contained in:
Dan Brown 2015-12-14 20:30:40 +00:00
parent 93223fcd3d
commit 123dc11583

View 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);
}