Redirect login page for CE Submit Event Form

Home Forums Calendar Products Community Events Redirect login page for CE Submit Event Form

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1160501
    Sean
    Participant

    Hi,

    We have set our calendar to require that a user be logged in to submit an event. As such, when someone navigates to /events/community/add and they are not logged in, they see the plain login form (see attached screenshot). We are using a 3rd party plugin to add custom front-end login and registration pages to our site. However, because the Community Events Submit an Event form is not a page, we cannot set a redirect option in the plugin.

    Is there a snippet or another plugin that will allow us to redirect users to our new login page if they visit /events/community/add while not logged in?

    Thank you,
    Karly

    #1160720
    Hunter
    Moderator

    Hey Karly,

    You might want to give a plugin like Theme My Login a shot. Let me know if it helps out and have a great evening. Cheers!

    #1160729
    Sean
    Participant

    Hi Hunter,

    Thanks for this suggestion! TML is a great plugin, but it actually has much of the same functionality as the current plugin I’m using (and would unfortunately cause conflicts).

    Is there another plugin (or even a snippet) that only adds functionality for redirects based on whether a user is logged in or not? In my case, I just need to redirect users that attempt to view /events/community/add while not logged in.

    Thanks and hope you have a great evening too!
    Karly

    #1161134
    Hunter
    Moderator

    Hey Karly,

    While these instances are outside our scope of support, I found a thread on Stack Exchange that could possibly help out. Best of luck and thanks for reaching out. Cheers!

    #1161169
    Sean
    Participant

    Hi Hunter,

    Thanks, this definitely points me in the right direction! I understand you can’t help further with crafting a solution, but regarding the Community Events Submit an Event form itself…what is its page id or slug? I’m not sure where I can locate that since the page isn’t in the Page list in the admin.

    Thank you,
    Karly

    #1161646
    Hunter
    Moderator

    Hey Karly,

    The submit event form slug is whatever you have set under Events > Settings > Community > Community rewrite slug (see screenshot below).

    Keep me posted on your progress as others may find this thread useful down the road and have a great day!

    #1161745
    Sean
    Participant

    Thanks Hunter. Unfortunately it looks like that won’t work as the function is looking for a page id or page slug…

    I did find another topic on your forums that seems like it might be something similar to what I’m looking to accomplish. Can you or someone from the TEC Support team please see if the code Nico supplied in this topic is still valid? If so, I will give that a try to see if it does what I’m looking for…just want to make sure the function still applies to the current version of the plugins 🙂

    #1162168
    Hunter
    Moderator

    Karly,

    It doesn’t hurt to give it a try. And sorry things aren’t working out easier for you, but I feel like you’re almost there! Let me know how it goes and thanks for the update. Cheers 🙂

    #1162202
    Sean
    Participant

    I tested Nico’s function from the other topic and it seems to still be valid for both the /add and /list urls. I’ll use that for now and hopefully those actions and function won’t be broken in a future release 🙂

    Thanks,
    Karly

    #1162921
    Hunter
    Moderator

    Karly,

    Thank you for the update and should the code not work in a future update, feel free to create a new thread and we’ll do our best to accommodate. Have a great week 🙂

    Cheers!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Redirect login page for CE Submit Event Form’ is closed to new replies.