get_current_user_id


get_current_user_id ( No parameters )

Returns:
  • (int) The current user's ID, or 0 if no user is logged in.
Defined at:
Change Log:
  • M: U

Description

Gets the current user's ID.

Related Functions

set_current_user, get_currentuserinfo, wp_get_current_user, get_current_network_id, _wp_get_current_user

Top Google Results

User discussions

wpseek mobile