• Resolved markotomic93

    (@markotomic93)


    We have encountered a significant issue with the Ultimate Member Plugin that requires attention. The problem revolves around the Redirect to custom page functionality, which is not working as intended despite having properly configured all the necessary settings.

    To provide more context, the Redirect in the Login form is currently set to its default value. On the other hand, the redirect after login in the UserRole has been set up to utilize a custom page. The domain in question is marko.suntastic.solar, and the designated redirect page is /login-umleitung.

    Strangely, we have found that unchecking the “Can view default homepage?” option and setting a redirect URL actually works perfectly. However, this solution is not feasible since users should still be able to access the homepage.

    At present, regardless of the settings, the system consistently redirects users to the homepage after logging in. As a troubleshooting attempt, we also tried setting the redirect value directly in the code as an input hidden field, but unfortunately, it did not yield any successful outcomes.

    We kindly request your assistance in resolving this critical issue with the Ultimate Member Plugin’s Redirect to custom page functionality. Thank you for your attention to this matter.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @markotomic93

    For security enhancements, we started to use the wp_safe_redirect() function instead of just a wp_redirect(). Please add this code snippet if you need to redirect the users after registration to the 3rd-party website with a different hostname:

    function my_allowed_hosts( $hosts ) {
        $my_hosts = array(
            'google.com',
            'mail.google.com',
        );
        return array_merge( $hosts, $my_hosts );
    }
    add_filter( 'allowed_redirect_hosts', 'my_allowed_hosts' );

    Please let me know if that works,
    Best Regards!

    Thread Starter markotomic93

    (@markotomic93)

    Hi Mykyta, thanks for the quick response.

    The redirect page is on our domain, we are going from ‘marko.suntastic.solar/login‘ to the ‘marko.suntastic.solar/login-umleitung‘.

    Like I said, when I prevent users seeing Homepage it works fine. Any Ideas?
    Is there a possibility to have a video meeting scheduled with the Support ?

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @markotomic93

    Probably when you have a restricted homepage then you are redirected to the login page with the ‘redirect_to’ attribute (it’s equal to the homepage URL in this case).
    It has the highest priority after successfully login redirect. Try to remove it from the web address line (&redirect_to={homepageurl}) and try to login in this case. You will be successfully redirected to the proper URL from role settings.

    Please let me know if these cases work on your end,
    Best Regards!

    Thread Starter markotomic93

    (@markotomic93)

    Hi,

    Sorry can you be more direct ?
    There is nothing in the url like ”?(&redirect_to={homepageurl})”.
    Where do I find it ?
    I’ve tried to solve the issue by going into the Plugin files it self to see if I can find something out but sadly with no luck.

    On my login page I have added :

    <input type="hidden" name="redirect_to" id="redirect_to" value="https://marko.suntastic.solar/login-umleitung">

    And I have tried anything but sadly nothing worked so far.
    A quick google meet/zoom call would be much appriciated.

    • This reply was modified 1 year, 4 months ago by markotomic93.
    • This reply was modified 1 year, 4 months ago by Jan Dembowski.
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    And I have tried anything but sadly nothing worked so far.
    A quick google meet/zoom call would be much appriciated.

    No. Please never make that ask again on this site.

    You are not a customer. At best you are an opensource collaborator working to solve your problem and benefit the community.

    The volunteers here are helping you out of the goodness of their hearts and for free. They are not “employees” and do not owe anyone anything. Even a reply and that includes the plugin developer and any plugin support.

    A “google meet/zoom” is way past that volunteer boundary and not at all appropriate here.

    If you need that level of support then please consider hiring someone via https://jobs.wordpress.net/ instead.

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @markotomic93

    Sorry, I cannot have a call based on these rules.
    Please see my Loom screencast for the details.
    https://www.loom.com/share/c230d8bffbf54e9490758dcaa7afb28a?sid=a1bb3a36-8cae-45fe-9a5e-e35b7e870726

    I guess you may have the 2 fields with name=”redirect_to” after customizing template.

    We have the filter hook in our plugin to customize the redirect link inside the redirect_to field.

    So this snippet inserted to your functions.php inside theme or child-theme should help you.

    function my_custom_redirect_to( $url ) {
        $url = 'https://marko.suntastic.solar/login-umleitung';
        return $url;
    }
    add_filter( 'um_browser_url_redirect_to__filter', 'my_custom_redirect_to' );

    Please let me know,
    Best Regards!

    Thread Starter markotomic93

    (@markotomic93)

    Hi,
    Thanks for your help but that unfortunatly didnt work.
    I’ve reinstalled the Plugin and kept everything as default.
    Switched User page with our custom page and redirection worked.
    However the UM Plugin prevents User from accsessing Homepage if he is still logged in.
    This is exaclty the functionality that we need,
    If the User is logged in and he type the marko.suntastic.solar he should be able to access the homepage without beeing logged out.
    Is there a way to edit some of the plugin files to be able to edit the url without beeing forced to logout ?

    Thanks a lot for the Help you provide.
    I’ve appreciate it .

    @markotomic93 Hi Mark, i had a similar issue on my website. Please check your redirect-URLs for capital-letters. I could solve my issues by changing all capital letters to lowercases in my redirection-URLs.

    Thread Starter markotomic93

    (@markotomic93)

    Hi @jens2021 , thanks but if you read trough my last message thoroughly you will see that the redirection is not a problem anymore.
    The problem/request ist, that the user which is logged in can go to any page /homepage without beeing forced to stay in logged in area.

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @markotomic93

    Please check my Loom screencast and let me know if you set the same options and you have the issues https://www.loom.com/share/0df6463acdb542889c78a5171b20c0ab?sid=2dfd815f-94f2-41bb-bfe2-724af57206ee

    Restriction settings for the Home page (Front page) should work as expected and you may restrict the page for the logged-in users.

    Best Regards!

    Thread Starter markotomic93

    (@markotomic93)

    Hi,

    Thanks for the quick reply.
    We already solved the issue with a custom redirect function.
    But thanks for the assist.

    All the Best
    Marko

    Hello Markotomic93,

    Having EXACTLY the same issue, would you be so kind as to tell me how you solved it?

    Thanks a million in advance!!

    Thread Starter markotomic93

    (@markotomic93)

    Hi @michelecaleffi, what issue do you mean exactly, redirect or accessing the Homepage issue when logged in ?

    Best Regards!

    Hey,

    thanks a lot for your reply! I’m going crazy with this!
    It’s about the redirect to URL function in user role setting.
    Just like you I cannot use the cheap turnaround of disabling access to the homepage for logged in users ??
    Thanks!

    @markotomic93 if you have any idea on how to solve this it would be very much appreciated!
    Thanks for your time!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Ultimate Member Redirect Issue’ is closed to new replies.