get_user_avatar($user); if (! $avatar || is_array($avatar) || strpos($avatar, 'img/noavatar') !== false) { // Avatar if found should be HTML $action = 'avatar'; $smarty->assign_by_ref("force_fill_action", $action); }