Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

bbPress Automatic Login

Posted on 2012-12-20
3
Medium Priority
?
584 Views
Last Modified: 2013-01-02
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!
0
Comment
Question by:Julian Matz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1200 total points
ID: 38711509
This is not really an "answer" but it goes in the direction that other sites are using.  Consider using OAuth.  I recently joined StackExchange, and it looks like that is what they are using.  It plays well with Gravatar and similar sites, so it might work for your needs.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 800 total points
ID: 38711700
There is also a (largely abandoned but still functional) WordPress plugin that allows it to use an external database for authentication. This is superior to using the standard PHP sessions because you would get the benefit of passing the user over to bbPress with only minimal coding gymnastics.

http://wordpress.org/extend/plugins/external-database-authentication/

OAuth is a possibility but you would be having to write a bridge from WordPress to bbPress using those credentials.  Same amount of work, I think.
0
 
LVL 21

Author Comment

by:Julian Matz
ID: 38737299
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 )
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question