Skip to content
This repository was archived by the owner on Oct 29, 2020. It is now read-only.

Redirect to referer after login.#1030

Merged
angaither merged 1 commit intoDoSomethingArchive:devfrom
angaither:login-redirect
Mar 6, 2014
Merged

Redirect to referer after login.#1030
angaither merged 1 commit intoDoSomethingArchive:devfrom
angaither:login-redirect

Conversation

@angaither
Copy link
Contributor

Fixes #1023

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it will work, just reading up on using HTTP_REFERER ...

http://drupal.stackexchange.com/questions/44264/how-to-redirect-user-to-previous-page-after-form-submit suggests having a fallback in place, and "Remember that some browser does not set $_SERVER['HTTP_REFERER'] and if a user browses directly to the page, "

What are your thoughts about that? Would an alternative be to set the form's action, like we do in the campaign_data ?

@angaither
Copy link
Contributor Author

I remember needing to set the action to submit the hidden forms to the correct urls, then this 'redirect' happens after that action.
If someone goes directly to the '/user' page they will be taken to their profile.

@aaronschachter
Copy link
Contributor

Right, it makes sense that you'd get taken their profile on /user.

I'm happy to merge and see how goes. Google shows some talk of issues with varnish and HTTP_REFERER, not sure if we're set up with varnish on our local installs.

@angaither
Copy link
Contributor Author

:trollface: varnish....
we will give it a try..... wishing on 🌠

angaither added a commit that referenced this pull request Mar 6, 2014
Redirect to referer after login.
@angaither angaither merged commit be9c3df into DoSomethingArchive:dev Mar 6, 2014
@angaither angaither deleted the login-redirect branch March 25, 2014 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

auth - after log in user is taken to /user; should reload page they started on

2 participants