Re: Getting user session info on non forum page
You’ll need to use the PHP functions to check the cookies… bbpress doesn’t use sessions by default.
Also, you wouldn’t want to simply use the userid, because that would be insecure since anybody could hack a cookie with any username.
bbPress and WP both store two cookies, the username and the encrypted hash of the password. You’ll have to use those in combination to do a lookup to the database to make sure they both match. I’d advise taking a look through the bbpress source code… it’s not terribly difficult to understand.
The other thing you could do… you could create a plugin / hack for bbPress to assign a session parameter after a successful login, which you could then check for in your other code.