Here is the patch which should fix the ugly hack in the drupal_goto on oauth_callback url submit handler.
D7 doesn't use $form['#programmed'] instead it uses $form_state['programmed'] and if its set to true it suppresses redirection.

Comments

chia’s picture

Status: Active » Needs review
StatusFileSize
new1.49 KB

Here's an updated patch to redirect user to the page from where he clicked signin with twitter. Its not useful to always redirect user to edit twitter account page.

justindodge’s picture

Status: Needs review » Reviewed & tested by the community

I applied the patch at #1 to 7.x-3.x-dev cleanly and it worked like a charm.

May be worth mentioning that there is a similar issue for D6 where a concern was noted over what happens if you login from user/login and are redirected back there: #671212: Redirect after login

I tested this use case and I was ultimately redirected to /user, so everything works as expected. I believe this is just the way D7 handles the login page now, so that makes it easy.

Thanks!

justindodge’s picture

Title: Fix for ugly drupal_goto hack in oauth callback url » Redirect user to original page after login

I do believe this title is a little more appropriate now, and it is preserved in the description that the previous implementation was a little hacky.

juampynr’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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