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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | legal-2504177-5-avoid-redirecting-to-user-page-after-legal-acceptance.patch | 2.24 KB | Rafal Lukawiecki |
| legal.patch | 1.26 KB | dtamajon |
Comments
Comment #1
maedi commentedThis 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 updatedOr maybe both.
Comment #2
avpadernoComment #3
Rafal LukawieckiI have updated the patch so that it applies to the current dev branch and Drupal version, but no other changes.
Comment #4
Rafal LukawieckiUpdating the built-in test of the patch, as the old test did not work.
Comment #5
Rafal LukawieckiOne 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.