In many of the sites I'm developing, I don't want user is redirected to his user page after login. Instead, should stay viewing contents which can see only if logged, even if had to accept Terms & Conditions in the middle.

I have created a patch to allow following the user navigation after user has logged and accepted Terms & Conditions.

Comments

maedi’s picture

This is a $form_state['redirect'] style solution, that's pretty good. Maybe a rules based redirect is the ultimate solution: #2743623: Rules Integration: Add rules event for T&C's updated
Or maybe both.

avpaderno’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Active » Needs review
Rafal Lukawiecki’s picture

I have updated the patch so that it applies to the current dev branch and Drupal version, but no other changes.

Rafal Lukawiecki’s picture

Updating the built-in test of the patch, as the old test did not work.

Rafal Lukawiecki’s picture

One more update to the test case of the patch: removing the assertion of the redirect, as the essence of this patch is to more intelligently deal with the destination. Fingers crossed.