It would be cool if you could disable the redirect via ?dest after the user logs in. In some cases, this is not always desired.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamesdixon’s picture

Status: Active » Needs review
FileSize
4.28 KB

Here's a patch we used to add the option to disable redirect via ?dest after the user logs in. Go to Config > System > Site information and uncheck "Redirect user to the page they tried to access after login" to disable redirecting via ?dest.

jamesdixon’s picture

Forgot to clean up the variable in the .install file, here's a new patch that removes the new variable created on uninstall.

deekayen’s picture

Status: Needs review » Needs work

Unless there's some technical reason for it, I'd prefer not to have abbreviated variable names.

jamesdixon’s picture

@deekayen: Fair enough! I have revised the patch to include full english variable names.

jamesdixon’s picture

Status: Needs work » Needs review

  • 4cfa518 committed on 7.x-1.x
    Issue #2311515 follow-up: Don't build destination if we won't use it.
    
  • b41436f committed on 7.x-1.x
    Issue #2311515 follow-up: Add variable info for destination option.
    
  • jamesdixon authored e2a3fbc on 7.x-1.x
    Issue #2311515 by jamesdixon: Have option not to redirect via ?dest...
lotyrin’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Needs review » Patch (to be ported)

  • Nixou committed 12b9f8c on 8.x-1.x
    Issue #2311515 by nixou: Have option not to redirect via ?dest after...
Nixou’s picture

Status: Patch (to be ported) » Fixed

Ported and committed.

jamesdixon’s picture

Awesome thanks @Nixou!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Kingdutch’s picture

I don't know if it warrants a new (critical) issue but this commit broke every existing install of r4032login because there's no update hook to set a default configuration value.

This causes the variable to remain unset if the module was already installed which in turn disabled the redirect to destination functionality.

Nixou’s picture

@Kingdutch

You're right : we should had an hook_update_N within this patch so the settings would have been set to TRUE by default.

I think it would be an overkill to develop a hook_update_N now because I guess that webmasters have now mostly set the settings by themself through the back-office.