I’m afraid that I’m getting over my head with my grand idea 🙂
I’ve found that my plugin that I’m hacking (dashboard editor) doesn’t always have the global $user_id available to me…
yes, yes I do a get_currentuserinfo() first…. what I’m finding is that if I init a function (add_action(‘init’,’func’)) and print the id it’s there… but by the time the real function I need to have an ID on, it’s always populating with an ID of 1 … as if the admin is logged in.
I’ve cleared cache, rebooted the power-grid, called Bill Gates in his jammies… nothing!
I did a hack to call the pluggable.php file directly at one time, and that skirted me around the issue in another instance…. but I feel like another man was touching me when I did that… just not right.
Anyhow, could someone enlighten me on the proper order of plug-ins of how and when the user_id gets populated…. I’ve traced a bit into the code, but I’m still creeped out about that man comment…
- The topic ‘user_ID not always available to plugins’ is closed to new replies.