i try this:
<ul class="dropdown-menu">
<li>
<a href="<?php echo osc_user_dashboard_url(); ?>">
<?php _e('My account', 'theme'); ?>
</a>
</li>
<?php
$seller = User::newInstance()->findByPrimaryKey(osc_logged_user_id());
if ($seller['b_company'] == '1')
if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li>
<a href="<?php echo osc_item_post_url() ; ?>">
<?php _e('Ad new', 'theme'); ?>
</a>
</li>
<li>
<a href="<?php echo osc_user_list_items_url(); ?>">
<?php _e('My ads', 'theme'); ?>
</a>
</li>
<?php }?>
<li>
<a href="<?php echo osc_user_logout_url(); ?>">
<?php _e('Logout', 'theme'); ?>
</a>
</li>
</ul>
and is WORKING - if is company link to "new ad" and "my ads" is visible (to all pages) and if is not company is not visible.
But my question is: is ok how I used the code?
I am referring to this section
$seller = User::newInstance()->findByPrimaryKey(osc_logged_user_id());
if ($seller['b_company'] == '1')
if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>