mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: Add a note to the DocBlock for wp_signon() mentioning that it doesn't handle setting the current user.
Also outlines the conditions that must be met for is_user_logged_in() to work with it. Part props SergeyBiryukov. Fixes #28116. git-svn-id: https://develop.svn.wordpress.org/trunk@40943 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
* set for a longer period depending on if the 'remember' credential is set to
|
||||
* true.
|
||||
*
|
||||
* Note: wp_signon() doesn't handle setting the current user. This means that if the
|
||||
* function is called before the {@see 'init'} hook is fired, is_user_logged_in() will
|
||||
* evaluate as false until that point. If is_user_logged_in() is needed in conjunction
|
||||
* with wp_signon(), wp_set_current_user() should be called explicitly.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @global string $auth_secure_cookie
|
||||
|
||||
Reference in New Issue
Block a user