get current user not working

Have you tried to go with the “Safe usage” alternative given in the commented section? I honestly don’t have any experience with wp_get_current_user(), since I never use it, but anyhow, this ought to work: global $current_user; echo ‘Username: ‘ . $current_user->user_login . ‘<br />’; echo ‘User email: ‘ . $current_user->user_email . ‘<br />’; echo ‘User … Read more

How to get the user description with get_users?

The Native get_users() function returns an array of user objects and each on holds [ID] => 1 [user_login] => admin [user_pass] => $P$Bxudi6gJMk2GRt2ed3xvZ06c1BPZXi/ [user_nicename] => admin [user_email] => [email protected] [user_url] => http://localhost/ [user_registered] => 2010-06-29 07:08:55 [user_activation_key] => [user_status] => 0 [display_name] => Richard Branson as you can see user_description is not a part of … Read more

Get user’s ID on logout

I think I figured this one out. I had misread this answer and hooked the function I wrote to wp_clear_auth_cookie (actually a function itself!) instead of clear_auth_cookie (the real hook), so that wasn’t working. But now using the real hook, I think it might be. Correct me if I’m wrong. Below is the function with … Read more