bbPress::setup_current_user()
Setup the currently logged-in user
Description
Do not to call this prematurely, I.E. before the ‘init’ action has started. This function is naturally hooked into ‘init’ to ensure proper execution. get_currentuserinfo() is used to check for XMLRPC_REQUEST to avoid xmlrpc errors.
Source
File: bp-forums/classes/class-bbpress.php
public function setup_current_user() { $this->current_user = wp_get_current_user(); }
Changelog
Version | Description |
---|---|
bbPress (r2697) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.