*

Luka

  • ***
  • 36 posts
Personal users only
« on: July 04, 2023, 11:16:25 AM »
How to show in a certain place only for an authorized user?

<?php if(function_exists('atr_show_attribute')) { echo atr_show_attribute(17); } ?>

I paste this code but it shows also not authorized user.

I have such settings for this attribute on the screen.

*

MB Themes

Re: Personal users only
« Reply #1 on: July 04, 2023, 06:29:55 PM »
osc_is_web_user_logged_in() returns true if user is logged.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on July 07, 2023, 09:41:24 PM
*

Luka

  • ***
  • 36 posts
Re: Personal users only
« Reply #2 on: July 05, 2023, 09:46:58 AM »
Thank you very much! I made this code and it works
Only for authorized users

<?php if(osc_is_web_user_logged_in()) { echo atr_show_attribute(20); } ?>

How to make only the author of the ad see it?

So that the agent can add additional data contacts and addresses of objects

*

MB Themes

Re: Personal users only
« Reply #3 on: July 05, 2023, 01:08:01 PM »
osc_logged_user_id() == osc_item_user_id()
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Luka

  • ***
  • 36 posts
Re: Personal users only
« Reply #4 on: July 07, 2023, 03:04:38 PM »
Thanks a lot! The script works