Site integration automatic login?
-
I have successfully merged bbpress with my website and it works fine sharing user data and logging in/out… very almost.
When a user first moves to the forum it shows them as not logged in, though if they click a forum link or refresh the page they are then shown as logged in.
I only modified pluggable.php a little to make the cookie easier to handle and I’ve tried adding a function (below) in index.php and template header. Very crude , checking a cookie is set and calling the login function, but it’s just a test:
if (isset($_COOKIE[bbpres...]) && isset($_COOKIE[IHuser...]) && isset($_COOKIE[IHpass...])){
$login = decode($_COOKIE[IHuser...]);
$password = decode($_COOKIE[IHpass...]);
bb_login($login, $password, $remember = false);
}Really I’m looking for where bbpress first checks to see if a user is logged in and sets headers but so far I’m out of luck. Where do I need to put my function so a user will be shown as logged in as soon as the navigate to the forum?
P.S. I will build a more solid function so a users password isn’t in a cookie, like I say – just a test!
- You must be logged in to reply to this topic.