Page Restrict
redirect too>> (4 posts)

  1. Tork
    Posted 3 years ago #

    is there a way that peeps after login getting redirected strait intoo web itself instead the dashboard???
    i wanted them to get strait to webcontent.....

    thank you!


  2. Tork
    Posted 3 years ago #

    sofar the support.... ill guess

  3. g60dave
    Posted 3 years ago #

    i would like to know if this can be done too, at present i have created a hyper link on the first page but its not ideal

  4. squalyl
    Posted 3 years ago #

    I had a similar problem.

    The page restrict form correctly contains an

    <input type="hidden" name="redirect_to" value="' . $_SERVER['REQUEST_URI'] . '" />

    that redirects the user logging in to the original page, okay.

    My problem was registration of new users.

    The page restrict form contains this following code to add a "register" link:

    if ( get_option('users_can_register') )
    $pr_page_content .= '	<a href="' . get_bloginfo ( 'wpurl' ) . '/wp-register.php">'.__('Register','pagerestrict').'</a> | ';

    I modified the plugin to add a register_to parameter to the wp-register URL.

    The problem is that wp-register does NOT forward this redirection variable after the user has completed the registration dialog, so the following "login" page does not redirect ok.

    The solution was to replace the call to wp-register.php by a call to wp-login.php?action=register&redirect_to=...

    I don't know the difference, but it works!

    So now the plugin code to generate the register link reads:

    if ( get_option('users_can_register') ) {
    	//if the redirect url is not empty, pass this to the register dialog
    	if(strlen(trim($_SERVER['REQUEST_URI']))>0) {
    	} else {
    	$pr_page_content .= '	<a href="' . get_bloginfo ( 'wpurl' ) . '/wp-login.php?action=register'.$redir.'">'.__('Register','pagerestrict').'</a> | ';

    and it works.
    It would be nice if the plugin author was ok to integrate this change in the next version of the page restrict plugin... thanks!

    Also note, that I had problems with Theme My login. I choose to delete this plugin, and use the standard wordpress login/register page instead.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Page Restrict
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.