Closed (fixed)
Project:
ipAuthenticator
Version:
5.x-1.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2008 at 07:29 UTC
Updated:
31 Oct 2008 at 19:44 UTC
I've just installed this module and it appears to be working: while logged out I can make posts etc.
However, the front page of my site gives me this PHP error:
Fatal error: Call to undefined function user_roles() in D:\xampp\htdocs\drupal-events\sites\all\modules\ipAuthenticator\ipauth.module on line 19
Other pages load normally.
Comments
Comment #1
joachim commentedThis happens on a unix system too, so it's not a Windows / clean URLs thing.
Comment #2
jonfrancisskydiver commentedJoachim, I tested the functionality on a fresh install of Drupal 5.7, posted a comment and viewed the frontpage while logged in and logged out out. I can't get that error to appear on my install. Perhaps the hook_init function is getting called before the user module has loaded on your install?
Try pasting the code below before this code $roles = user_roles(); in the ipauth_init() function.
So once you finish that the ipauth_init function should look like:
Comment #3
joachim commentedYup, pasting that in fixes the problem.
I forgot to say that it was appearing only for anonymous users whose IP was putting them into a role. When logged in as the admin user it was fine.
My install is a 5.6.
Just tested on a clean 5.7, and works fine without the page.
I assume between 5.6 and 5.7 the weighting of the user module was changed?
Comment #4
jonfrancisskydiver commentedComment #5
code rader commentedI've got the same problem going on.
I saw the that the code checked for function_exists("user") and tried changing it to function_exists("user_roles"), but I'm getting the same error that is mentioned above.
Comment #6
code rader commentednevermind - I didn't see that the patch was commented out. teach me to use an editor without highlighting.
but I did have to uncomment the patch to get it to work.
Comment #7
jonfrancisskydiver commentedCode Rader, I have updated the code to not be commented out.
Comment #8
jonfrancisskydiver commentedComment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.