How to get user info inside plugin
-
I need to get the user info at the very start of my plugin and make it available for the whole plugin, but when I do $current_user = wp_get_current_user(); it tells me that that function doesn’t exist. I read that I can solve this by using the plugins_loaded action, the only problem there is if I make the current user info available with that action, then I have to run my whole plugin through the plugins_loaded action too. Is there a way to make the current user info available to all the code in your plugin?
- The topic ‘How to get user info inside plugin’ is closed to new replies.