user login access oddities
hobo - August 20, 2009 - 19:34
| Project: | ipAuthenticator - authenticates an IP to a role |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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)

#1
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
#2
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.
#3
Subscribing. I am experiencing the same issue, however PeterP's workaround also fails to fix the issue on my setup.
#4
thanks, this worked for me. *edit: PeterP's workaround that is.
#5
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!
#6
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!