Link to home
Start Free TrialLog in
Avatar of Julian Matz
Julian MatzFlag for Ireland

asked on

bbPress Automatic Login

I need to develop a Wordpress site that will use an external user database. I've done this before by creating a custom login/registration page and using standard PHP sessions. The only problem now is that I also need to integrate with bbPress. I need to be able to do 2 things:

When a user logs in via my custom login page, that user should then also be authenticated to use the bbPress forums.

When an active, valid PHP session exists, but a bbPress session does not (for example, if the bbPress session expires before the PHP session), I need the bbPress session to be created.

Can anyone help me with this, point me in the right direction, or give me some kind of starting point?

Much appreciated!
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Julian Matz

ASKER

Thanks! I still need to research OAuth a bit more, but it looks like some of the following WordPress functions could come in very handy:

wp_create_user( $username, $password, $email )
wp_insert_user( $userdata )
wp_update_user( $userdata )
wp_signon( $credentials, $secure_cookie )
wp_set_auth_cookie( $user_id, $remember, $secure )