I would like to have the following feature:
1) anonymouse users try to view a page of some restricted content type.
2) some module (e.g. r4032login) redirects anonymous users to user/login.
3) ip_login shows the login link if the ip address matches the range.
4) autholized users by ip_login are redirected to the page which the user tried to view in (1).
The attached patch may resolve the issue in this scenario. The patch works as follows:
1) save the destination url in the session (_SESSION) if the destination (_GET) is given for user/login.
2) call drupal_goto with the saved destination, in ip_login_attempt_login().
Please note that the final destination is over written if other module (for example, login_destination) is enabled.
Moreover, drupal_get_destination() may be more suitable for this purpose. In this patch, since I'm not so sure about the query variable "q", I dare to use a direct way to get the destination.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | ip_login-destination-0.01.patch | 1.65 KB | josaku |
Comments
Comment #2
josaku commentedComment #3
josaku commentedip_login-destination.patch queued for re-testing.
Comment #5
josaku commentedComment #6
josaku commentedI could not understand well the way to send the patch re-test.
Please avoid the recent my comments that were just tries from this point of view.
Comment #7
amateescu commentedClosing old issues.