First off great module!

I have several ip ranges set up to authenticate to a role.

If i'm inside the ip range i have access to /user
If i'm outside the ip range get a 404 access denied error for /user

BUT

If im inside the ip range i have access to the user login BLOCK
If im outside the ip range i don't get access to the login BLOCK

It would be good to have access to both /user and the login block no matter what case it was (inside or outside the ip range)

Comments

mgifford’s picture

Yea, I totally had that problem. Annoying too as I was just about to blast out a note to encourage people to register, then realized that they were getting that 404 message.

Mike

ti2m’s picture

Version: 6.x-1.5 » 6.x-1.x-dev

Same here, but I don't get the usual my account page on /user, I get the user login form, although I'm logged in. Also "my account" and "logout" disappered, but therefore I can see "login". as user outside the range I can access /user
As its crutial for me I tracked it down to the menu definition in ipauth.module line 184-222. It goes back to is_ipauth_user() as this grants access to the pages, or in this case denies it. Took a look and it only makes sense to me if you add another "true" to the access arguments. So added the fourth value to line 192, 200, 210, 219 and now it all works for me as its supposed to.

bbilocura’s picture

Subscribing. I am experiencing the same issue, however PeterP's workaround also fails to fix the issue on my setup.

ctpmp’s picture

thanks, this worked for me. *edit: PeterP's workaround that is.

davidbessler’s picture

PeterP's fixed worked for me too. Just to be clear, I changed the all lines that said things like:

'access arguments' => array(FALSE, TRUE, TRUE),

to

'access arguments' => array(FALSE, TRUE, TRUE, TRUE),

Great module! Great support!

bbilocura’s picture

Update on my previous post: just tried the workaround again and now it works. I must've done something stupid when I tried a couple of weeks back.

Thanks everyone!

tetramentis’s picture

PeterP, nice investigation work!

Tried your solution on 6.x-1.5, but so far does not seem to work. Will try 6.x-dev.

tetramentis’s picture

I had a totally different problem, because I failed to notice (and use) the new "IPAuthenticator User login" block.
Now everything is fine.

Thanks for the great module!

vacilando’s picture

Priority: Normal » Critical

This has cost me a day of my life. Absolutely critical bug -- and I am marking it as such.

Above solution (#2 and #5) work fine.

Could the maintainer please fix this as soon as possible?!

vacilando’s picture

Title: user login access oddities » Anonymous users are denied access to user/* pages

Adjusting the title.

vacilando’s picture

Could the maintainer kindly apply the fix as described under #5 above, not forgetting to add one more 'TRUE' also to 'access arguments' => array(FALSE, variable_get('user_register', 1), TRUE), as described here.