I have been working on a WordPress plugin for a couple of days, and I got it to the point where it works - I was however unhappy with the procedural code (I was rushing it for my site, to come back to it later).
Anyway, I've now started moving everything into classes and appropriate functions - and I've hit a snag. I need to access user data of the currently logged in user, however - no matter how much I try I am getting absolutely nothing back from WordPress.
Most functions provided by wordpress to access data are pluggable, so I want to avoid them. What I essentially need is to be able to see the details of the current logged in user, I've tried creating an extension class for WP_User but was a little stuck as to how to get anything out of it (besides, WP_User was returning 0 for everything.)
My question is: How can I grab user data? How do I know who is logged in without using pluggable functions? Would anyone mind helping?
Thanks,
Jake