There are many situations where it may be desirable to have the destination parameter (i.e. "https://example.com/user/login?destination=/node/2932") take precedence over the redirects configured in the Login Redirect Per Role module.

For example, if a user tries to access a page on the site that requires a login and we want to redirect them back to the page after logging in.

I'm attaching a patch which provides a configuration option that will allow for this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nplowman created an issue. See original summary.

nplowman’s picture

JeroenT’s picture

Status: Active » Needs review

  • Antonnavi committed 15464ff on 8.x-1.x authored by nplowman
    Issue #3020104 by nplowman: Allow destination parameter to override...
Antonnavi’s picture

Status: Needs review » Fixed

Works/looks fine for me.

Antonnavi’s picture

Assigned: nplowman » Unassigned
pratik.mehta19’s picture

Status: Fixed » Closed (fixed)
GNUMatrix’s picture

Component: Code » Documentation
Priority: Normal » Minor

Perfect. If someone could add a note at the top of the module config UI to indicate that this is exactly what the "destination" checkbox is for, that would have saved me the trouble of figuring it out by finding this issue in the queue :-)