add this before the field and don't forget to close the bracket after the field
<?php if ( osc_is_web_user_logged_in() ) { ?>
your code
} ?>
Works perfectly! If anyone has a similar issue, this is how the code should look if you want to hide contact form to non-logged in users:
file: oc-content\themes\modern\inc.search.php
Code:
<div class="has-icon author">
<?php if( osc_item_user_id() != null && osc_is_web_user_logged_in() ){ ?>
<div class="ico-author ico"></div>
<?php echo osc_item_contact_name(); ?>
<?php } ?>
<div class="mini">
<?php if( osc_item_show_email() ) { ?>
<?php echo osc_item_contact_email(); ?>
<?php } ?>
<?php if ( osc_user_phone(osc_item_user_id()) != '' && osc_is_web_user_logged_in() ) { ?>
<?php _e("Tel", 'realestate'); ?>.: <?php echo osc_user_phone() ; ?>
<?php } ?>
</div>
Lines 236