accessing WP_User object
-
Hi,
I have this in my code
$current_user = wp_get_current_user();
$temp_var = var_dump($current_user);Tresult on the screen is:
object(WP_User)#338 (8) { [“data”]=> object(stdClass)#355 (10) { [“ID”]=> string(2) “50” [“user_login”]=> string(10) “testuser20”which is good.
However, how do I access the “ID” and “user_login” from what the dump shows me on the screen?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘accessing WP_User object’ is closed to new replies.