• Resolved szerletics

    (@szerletics)


    Hi Team,
    we use your ultimate member plugin to manage users. The plugin works great, we are very happy with it.

    We set in the Ultimate Member global settings that the page is only visible for the users who are logged in, then we used another plugin WpForo, and set that WpForo is under https://URL/wpforo link, then I added this url to “Exclude the following URLs”, it works fine, the page is visible for the users who are not logged in, but when the user clicks on a topic, of course URL changes, and it looks like https://URL/wpforo/topic-1/, for example, and we can’t access it, we have to log in.

    We want this WpForo page to be visible to users who are not logged in, and who can ONLY view topics/threads. The easiest way would be if you allow wildcards at “Exclude the following URLs”, like https://URL/wpforo/*, or https://URL/wpforo/(.*). But if that’s not possible, and you don’t plan to include this feature, then I want to know if it’s possible with hooks, if so, which hook should we use, and where?

    Thanks a lot
    Istvan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @szerletics

    Sorry for the late response. We were busy catching up with our support logs.

    Could you please try this code if this works for you? You might need to modify it to match your setup.

    add_filter("um_access_check_global_settings","um_custom_access_check_global_settings", 9999 );
    function um_custom_access_check_global_settings(){
    
       $current_url = UM()->permalinks()->get_current_url( get_option( 'permalink_structure' ) );
       
       if (strpos($current_url,'/wpforo/') !== false) { 
         UM()->access()->allow_access = true;
       }
    }
    
    Thread Starter szerletics

    (@szerletics)

    Hallo Champ Camba,

    thank you for you answer. I added this function to my code. If page redirect to /wpforo/, then I get 500 (Internal Server Error). I think it is still related to access.

    Can you help me?

    Thank you!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @szerletics

    You will need to modify or check the error log to see the details of the 500 error. I suggest that you ask the hosting provider to assist you retrieving it.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @szerletics

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards,

    They are getting an internal server error because allow_access is a private member of the access class. There doesn’t seem to be getter or setter methods for allow_access, so I’m guessing allow_access was meant to be public.

    • This reply was modified 4 years, 8 months ago by Shaun.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude urls with wildcard’ is closed to new replies.