#Overview
This function works similarly to the wp_get_current_user function, but it will also work during an auto-login session.
#Return
(WP_User) Returns a WP_User
object or false
if no user is found.
#Get the current user
$user = wpf_get_current_user(); if ( false !== $user ) { echo $user->user_email; // The email address of the current user, or temporary auto-login user }
Was this helpful?
Let us know if you liked the post. That’s the only way we can improve.