Marked as best answer by frosticek on March 21, 2022, 03:37:40 PM
*

7ala

  • ****
  • 144 posts
Re: The problem of sending messages to users without registration
« Reply #15 on: March 21, 2022, 01:06:52 PM »
I found the solution

Code: [Select]
<?php if(!osc_is_web_user_logged_in()) {
    
osc_add_flash_error_message(__('Please log in to see your conversations.''instant_messenger'));
    
header('Location:' osc_user_login_url());
    exit;
   } else { 
?>

Thank you very much ??? ;D
« Last Edit: March 21, 2022, 03:41:48 PM by 7ala »

*

MB Themes

Re: The problem of sending messages to users without registration
« Reply #16 on: March 21, 2022, 03:37:52 PM »
Cool, thanks for sharing ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: The problem of sending messages to users without registration
« Reply #17 on: March 21, 2022, 03:53:50 PM »
It is working properly now
Is writing the code this way correct?
I think the code is a bit long
Can it be shortened?
Code: [Select]
<?php if(!osc_is_web_user_logged_in()) {
    
osc_add_flash_error_message(__('Please log in to see your conversations.''instant_messenger'));
    
header('Location:' osc_user_login_url());
    exit;
   } else { 
?>

<?php if(osc_is_web_user_logged_in() && $item['fk_i_user_id'] <> osc_logged_user_id() || !osc_is_web_user_logged_in()) { ?>
Thank you all

*

MB Themes

Re: The problem of sending messages to users without registration
« Reply #18 on: March 21, 2022, 03:54:35 PM »
@7ala
Code looks to be correct.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: The problem of sending messages to users without registration
« Reply #19 on: March 21, 2022, 03:56:27 PM »
 :-* ;)