function get_current_user_id() {}

Get the current user’s ID

Return values

returns:The current user’s ID

Source code

function get_current_user_id() {

	$user = wp_get_current_user();

	return ( isset( $user->ID ) ? (int) $user->ID : 0 );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: