container_guid); if ($container instanceof ElggGroup) { $can_tag = $viewer && $container->isMember($viewer); } else { $can_tag = $viewer && $viewer->guid == $owner->guid || user_is_friend($owner->guid, $viewer->guid); } // only owner and friends of owner can tag if ($can_tag) { ?>