Andy, stdClass change is all good, but $bp is weirdly unreachable.. $bp->loggedin_user->id for example randomly decides to return empty string how ever we tried. Yes, wp-blog-header is included and global $bp line is there.
Do you do anything extra to call this variable? or any preparation is necessary other than what we are doing?
Anyone experiencing similar error?