My users receive emails with deep-links to pages.
Although the ip_login settings are set correctly, and they have access rights to the emailed link, an "access denied" page is generated - they are not automaticaly logged in. The work-around for the user is to a) press F5 (a lesser known tactic) of b) click the link again.
Normally, the login-block is on screen, but not in this case, so the "Log in automatically" link is not visible.

The problem is in login.module file, the variable LOGIN_AS_DIFFERENT_USER .
In function ip_login_user_logout(), this is set in $_SESSION and $_COOKIE with some experimental code.
In function ip_login_boot(), the variable is tested, and as a result: // user logged out, <...> so wait for user action.

I think there is some problem with FALSE, TRUE, 'not set', is_null ...

Comments

EJG’s picture

+ 1

jim kirkpatrick’s picture

I'm flat out right now with work but will be happy to accept patches against D6 or D7 dev branches.

johnv’s picture

Status: Active » Needs review
StatusFileSize
new1.96 KB

Attached patch does some code cleanup, but does not resolve the issue yet.

Ths following errors appear when using the link www.example.com/admin/reports/dblog:

TYPE			DATE				MESSAGE						USER
access denied	28/02/2012 - 14:29	admin/reports/dblog				USER	
user			28/02/2012 - 14:29	Session opened for USER by IP Login.	USER

It seems that the user_access() call (or some other access-call) is done with old privileges/user, although the reported user is OK.

johnv’s picture

StatusFileSize
new2.3 KB

This patch resolves the problem.
Somewhere in the login-process, the required page is not reached. The patch adds a drupal_goto() statement.
It also cleans up the cookie-setting.

jim kirkpatrick’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

Patch looks good, committed to D7 dev... thanks John V: Commit 35d2aa7.

Needs D6 version port, will apply after testing in DEV on D7.

jim kirkpatrick’s picture

Status: Needs review » Patch (to be ported)
jim kirkpatrick’s picture

Status: Patch (to be ported) » Fixed

Now applied to 6.x-2.0-dev.

Status: Fixed » Closed (fixed)

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