Core Function
View Source on Trac ↗ get_current_user_id()
get_current_user_id( ) Gets the current user's ID.
Return Value
(int)
The current user's ID, or 0 if no user is logged in.
Function Information
Since Version
MU (3.0.0)
Source File
wp-includes/user.php
Advertisement