Hi, with latest dev of 2011-10-06, I see the following unwanted feature:
- If the user has a matching IP-address, the user should be logged in automatically, but he is not. Instead, only the link 'log in automatically' is shown.

Comments

johnv’s picture

Title: Inappropriate behaviour. » Incorrect behaviour: no auto-login + 'Log in automatically' when no proper IP for user.
Status: Active » Needs review
StatusFileSize
new5.66 KB

Attached patch corrects this issue.
There is still some hassle with cookies etc. I hope peterx hurries with his in-session user change modification :-)

Also:
- removes superfluous variable LOGIN_BY_IP_COMPLETE
- renaming for better debugging:
-function _ip_login_can_use_alternate_account($user) {
+function _ip_login_can_login_as_another_user($user) {

johnv’s picture

StatusFileSize
new4.47 KB

A better patch..

johnv’s picture

Title: Incorrect behaviour: no auto-login + 'Log in automatically' when no proper IP for user. » When correct IP-address is set, there is no auto-login, but only link 'Log in automatically'.
jim kirkpatrick’s picture

This behaviour is dependent on cookies being set... Full testing of the existing setup is required to avoid breaking functionality... Will have a look soon, thanks Johnv.

jim kirkpatrick’s picture

This is odd... This behaviour and that in #1310634: link 'log in automatically' is shown, even for user without proper IP-address is related and perhaps stems from the D7 port not quite matching D6 behaviour in certain places... Again, this and the above issue need careful testing because D6 is the 'master' for now so all changes must happen there first and pushed to D7 when tested.

Again, I'll do a full test of both very soon and see what the issue is. Thanks.

jim kirkpatrick’s picture

Status: Needs review » Fixed

Thanks John... This is exactly what the code needed: a clear process in hook_boot(). I've added with minor tweaks and back-ported it to the 6.x-2.x branch. Now D6 and D7 share identical hook_boot() and ip_login_logout() methods.

Committed in D7 = 00c9240 and D6 = 065dd02, together with your work in #1310634: link 'log in automatically' is shown, even for user without proper IP-address and my work to add a new IP Login link-only block.

Thanks again.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

reduced text to address only 1 issue.