Calendar for logged in users only

Home Forums Calendar Products Events Calendar PRO Calendar for logged in users only

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #67438
    jwwalker
    Participant

    Hi,
    I’d like to restrict the entire calendar to logged-in users only. I know I can use something like this code to check if a user is logged in:
    $user = wp_get_current_user();
    if (isset($user->ID) and $user->ID > 0) return;

    But how can I then use that to restrict the Calendar? Ideally I want to redirect all non-logged in users to the login page.

    Thanks,
    James

    #67453
    Barry
    Member

    Hi James,

    Have you checked out our tutorials sections? We’ve got one that explains a method of hiding events from users who are not logged in that could be of interest here.

    Thanks!

    #67460
    jwwalker
    Participant

    Hi Barry,
    Thanks, I did see that post but I want to completely redirect any non logged-in user. A PHP header location redirect won’t work here, so I was wondering if there’s any other way of doing this.
    Thanks,
    James

    #67472
    Barry
    Member

    Hi! We’ll need to leave it up to you to figure this one out, especially as your requirements are so bespoke 🙂

    Thanks and good luck!

    #980997
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Calendar for logged in users only’ is closed to new replies.