[buddypress-trac] [BuddyPress Trac] #7001: Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init()
buddypress-trac
noreply at wordpress.org
Fri Apr 8 00:06:54 UTC 2016
#7001: Notice: bp_setup_current_user was called incorrectly. The current user is
being initialized without using $wp->init()
--------------------------+----------------------
Reporter: yawalkarm | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: API | Version: 1.7
Severity: normal | Resolution: wontfix
Keywords: |
--------------------------+----------------------
Changes (by r-a-y):
* status: new => closed
* severity: major => normal
* priority: highest => normal
* version: 2.5.0 => 1.7
* milestone: 2.5.3 =>
* keywords: needs-patch =>
* resolution: => wontfix
Comment:
Thanks for the report, however you answered your own question:
> Just try is_user_logged_in() check in functions.php and you will get
this notice.
Using `is_user_logged_in()` in your theme's `functions.php` is too early.
You should be running any type of user checks such as
`is_user_logged_in()` on the `'setup_current_user'` hook or later.
Check out the action firing sequence in WordPress for more details:
https://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_a_Typical_Request
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7001#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list