WPFront
  • Home
  • Plugins
    • Notification Bar Plugin
      • Plugin Ideas
      • Plugin Settings
      • Plugin FAQ
    • Scroll Top Plugin
      • Plugin Settings
      • Plugin FAQ
    • User Role Editor Plugin
      • Plugin Documentation
      • Plugin Settings
      • Plugin FAQ
    • Paddle Gateway Plugin
  • Go Pro
  • Support
    • Documentation
    • FAQ
  • Affiliates
  • Contact
  • Login
  • Cart
  • This topic has 2 replies, 2 voices, and was last updated 9 years, 9 months ago by Syam Mohan.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 20, 2015 at 6:39 am #13079
    Daniel Klotz
    Spectator

    Hey Syam,

    tried to use the built-in login redirect feature but we have an issue with our existing logic.
    when users click on a page link that is only accessible by members, they’ll be redirected to a front-end-login form (using theme-my-login here) with added ‘redirect-to’ GET-parameter. this works fine so far.

    but when setting a global login redirect via your plugin, it is always using this defined redirect, not the more specific one already supplied.

    since one cannot freely change the priorities for each login redirect entry, how can we achieve to respect more specific redirect urls?

    do you have an idea how this can be done? is there any filter hook we could use?

    thanks in advance,

    July 20, 2015 at 6:43 am #13080
    Daniel Klotz
    Spectator

    the custom login url looks like this:
    http://wp.dev/login/?redirect_to=http%3A%2F%2Fwp.dev%2Fmy-custom-member-page%2Fanother-subpage%2F&reauth=1

    July 20, 2015 at 7:33 am #13089
    Syam Mohan
    Keymaster

    Hi Daniel,

    I don’t think I quite understand what your scenario is.

    Here is how Login Redirect works. It internally uses a WordPress filter called ‘login_redirect’. This filter will be called from wp-login.php after a user has been logged into your system to find the redirect location. Usually it doesn’t matter how the login form is created (by a plugin/theme), it always posts the data to wp-login.php so this filter will be executed.

    ‘redirect_to’ is a WordPress recognizable parameter, which will be extracted in wp-login.php and passed as an argument to this filter. User Role Editor tries to find the redirect URL based on the configurations and if it finds one, returns that URL from the filter else returns the passed ‘redirect_to’.

    Calling this filter and setting its value as ‘redirect_to’ within the login URL will not work, since the filter requires a logged in user to find the URL.

    Thanks

    Syam

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Redirect Priority’ is closed to new replies.
Log In
Lost Password

Search Topics

Documentation

FAQ
Roles List Add Role Edit Role Delete Role Restore Role Add or Remove Capability Assign/Migrate Users Posts/Pages Extended Permissions Custom Post Type Permissions Navigation Menu Permissions Widget Permissions Admin Menu Editor Media/Attachment File Permissions User Level Permissions Content Restriction Shortcodes Login Redirect Export Roles Import Roles Bulk Edit Settings Multisite Roles List Multisite Add New Role Multisite Edit Role Multisite Delete Role Multisite Restore Role Multisite Sync Roles Multisite Settings WordPress Capabilities Actions and Filters Installation Instructions