[wp-trac] [WordPress Trac] #39051: docs for get_current_user_id(): add 0 return value if no user logged in
WordPress Trac
noreply at wordpress.org
Sun Dec 4 16:24:57 UTC 2016
#39051: docs for get_current_user_id(): add 0 return value if no user logged in
--------------------------+------------------------------
Reporter: ovenall | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: docs
--------------------------+------------------------------
Description changed by swissspidy:
Old description:
> The docs for get_current_user_id() do not specify that 0 is returned if
> no user is logged in. Change to:
>
> /**
> 419 * Get the current user's ID
> 420 *
> 421 * @since MU
> 422 *
> 423 * @return int|0 The current user's ID. Returns 0 if no user is
> logged in.
> 424 */
New description:
The docs for get_current_user_id() do not specify that 0 is returned if no
user is logged in.
Change to:
{{{#!php
/**
* Get the current user's ID
*
* @since MU
*
* @return int|0 The current user's ID. Returns 0 if no user is logged in.
*/
}}}
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39051#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list