*

7ala

  • ****
  • 144 posts
Contact page
« on: January 31, 2022, 09:30:08 AM »
I have this code
Code: [Select]
<?php if(osc_is_web_user_logged_in()) { ?>
<span><a href="<?php echo osc_contact_url(); ?>" ><?php _e('Contact''Them'); ?></a></span>
<?php ?>
To show the contact page for registered users only
But if you register the link in the browser
http://localhost/contact
accessible
Is there a way to redirect the user to the login page?
Even if the link is written in the browser

*

MB Themes

Re: Contact page
« Reply #1 on: January 31, 2022, 09:32:37 AM »
You can put at start of page
Code: [Select]
If() {
  header('Location....);
  exit;
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: Contact page
« Reply #2 on: March 25, 2022, 01:43:58 PM »
You can put at start of page
Code: [Select]
If() {
  header('Location....);
  exit;
}

I do not understand

I did something
Code: [Select]
<?php echo (osc_is_web_user_logged_in() ? osc_contact_url() : osc_user_login_url()) ; ?>It only works when you click on the link, it will be transferred to the login page
But if the link is written directly, it will not be directed to the login page
He can even send messages even if he is not registered
« Last Edit: March 25, 2022, 01:46:56 PM by 7ala »

*

MB Themes

Re: Contact page
« Reply #3 on: March 25, 2022, 08:45:56 PM »
Changing link does not mean contact form cannot be used, even if form is not available
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots