Support » Plugin: User Access Manager » Redirect user not working.

Viewing 14 replies - 1 through 14 (of 14 total)
  • I have the same problem, redirect doesn’t work 🙁

    Marco

    (@fugamarcogmailcom)

    I have the same problem, redirect doesn’t work!!!

    I am having the same problem. My browser give me an error saying it is trying to redirect too many times in a row

    Plugin Author GM_Alex

    (@gm_alex)

    Should be solved with the current version.

    Sorry, dear GM_Alex, redirect user does not work with UAM 1.2.4.3

    Plugin Author GM_Alex

    (@gm_alex)

    Hi,

    could you provide some more detailed information?

    Greetings,
    Alex

    OK, but sorry my google english )

    There is a page designed for a group of users – http://expertbaby.ru/nashi-kursyi/sekretyi-vospitaniya-otvetstvennogo-rebenka/
    (By the way, here is protected only by the main text, but not the sidebar, and it may be unique for this page.)
    Here, the page where I need to redirect unauthorized user – http://expertbaby.ru/blockedpage/.
    Now everything is set up that way, but as you can see, nothing works.

    And no matter what the settings are set to Redirect User. Does not work redirect to the home page or a custom page or a custom URL.

    I read somewhere and tried to fix for an experiment – line 298 of user-access-manager.php:
    add_action ('template_redirect', array ($oUserAccessManager, 'redirect'), 10);
    the redirection works, but found a problem with a page templates – always use a basic template, regardless of the selected template of the page.

    In all other respects your plugin works fine, thank you very much!

    Dear Alex, do you have any thoughts on this?
    Do you need any more information?
    Perhaps if we think about it all together, the right solution will come faster? )

    Plugin Author GM_Alex

    (@gm_alex)

    At the moment I’m busy at my work, I will check it at the weekend.

    Same problem, it only shows the text – You have no permissions to view this page…

    but it doesnt redirect the user to the page which I set…

    thank you for the fix

    I found something like that:
    Redirect works with a default URL of post/page like “site/?p=123” and does not work with a permanent link like “site/link_of_page”.

    I was having the same issue (redirect works with default URL, not with permalinks).

    I found this older post describing a code change, but couldn’t apply it as-is because it refers to an older version of UAM.

    However, below change in UserAccessManager.class.php, public function redirect does solve the issue for me:

    } elseif (isset($oPageParams->query_vars['name'])) {
    		// frene7ik 20130516
                    //$oObject = get_page_by_title($oPageParams->query_vars['name'], OBJECT, 'post');
    		$oObject = get_page_by_path($oPageParams->query_vars['name'], OBJECT, 'post');	
    
                    if ($oObject !== null) {
                        $oObjectType = $oObject->post_type;
                        $iObjectId = $oObject->ID;
                    }

    Thank you very much, frene7ik!
    Your solve really works. But for page redirecting need correct the next ELSEIF, by analogy of your code:

    ...
                } elseif (isset($oPageParams->query_vars['pagename'])) {
                    //change by Che 17-05-13
                    //$oObject = get_page_by_title($oPageParams->query_vars['pagename']);
                    $oObject = get_page_by_path($oPageParams->query_vars['pagename']);
    ...

    And it perfect works with permalinks and with home page (do not check with default URLs)
    This solution completely satisfied me. New bugs not found for now. So,
    http://expertbaby.ru/nashi-kursyi/sekretyi-vospitaniya-otvetstvennogo-rebenka/ is redirecting to http://expertbaby.ru/blockedpage/

    Plugin Author GM_Alex

    (@gm_alex)

    I will check that fix again and if it works for me I will add this to the new version.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Redirect user not working.’ is closed to new replies.