Call to undefined function: user_access() error for anonymous user
yngvewb - September 18, 2008 - 13:28
| Project: | Droplist Filter |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jchan |
| Status: | closed |
Jump to:
Description
When trying to use Droplist filter for an anonymous user (ie create a node) I get this error:
Fatalerror: Call to undefined function: user_access() in ...sites/all/modules/droplist_filter/droplist_filter.module on line 134
It works perfectly for authorized users.

#1
Seems like this happens only when caching is turned on. Will try to figure something out.
#2
Good!
#3
This should be fixed now in 5.x-1.3. The problem was that when caching is enabled, not all the Drupal API functions are available during hook_init(). Solved it by running the code during hook_menu() instead.
Thank you yngvewb, for finding the bug.
#4
Automatically closed -- issue fixed for two weeks with no activity.
#5
how can i disable caching using phpmyadmin?
#6
You don't need to do that. Just log in to Drupal as an admin, and go to:
Administer > Site configuration > Performance
#7
i did not ask what i need not. how can i disable caching using phpmyadmin?
#8
blockedmind, what you are asking is outside the scope of Droplist Filter. I'm sorry that I cannot help you.