afallingpanda Posted December 16, 2013 Share Posted December 16, 2013 Hello master php coders, i have one question today. Basically im trying to build a site which has a profile feature you can login to your account and make posts on the site. The site is also going to have a tab called forums which is going to be just a forum software such as ipboard or xenforo, but my question is how would i be able to make it so you only have to login ONCE, so i login to my website account and dont have to relogin to xenforo ( so basically the accounts are ONE) . Or if this is not possible, what would be the closest thing i could do do make it behave like that. thanks for helping guys Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/ Share on other sites More sharing options...
Ch0cu3r Posted December 16, 2013 Share Posted December 16, 2013 (edited) You'll need to see if the forum has an api to allow you to integrate the forums login with your sites login. You then use the api for registering and logging in users to you site. Heres an API for IPBoard http://www.invisionpower.com/support/guides/_/advanced-and-developers/integration/single-sign-on-sso-r209 xenforo has a few mods for various forms of integration. http://xenforo.com/community/resources/categories/bridges-integrations.17/ Edited December 16, 2013 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462492 Share on other sites More sharing options...
scootstah Posted December 16, 2013 Share Posted December 16, 2013 The easiest way would be to tap into the forum's user/session management code. The specifics depend on which software you pick, but there's a good chance that someone has already done it and written a tutorial or something. Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462493 Share on other sites More sharing options...
dalecosp Posted December 16, 2013 Share Posted December 16, 2013 These are sometimes called "bridge" addons/modules. You might look for one of those already written.I've written my own bridge between a site and vBulletin. Not for the timid, but if you've got some experience you should be able to hack something together fairly quickly. Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462498 Share on other sites More sharing options...
scootstah Posted December 16, 2013 Share Posted December 16, 2013 These are sometimes called "bridge" addons/modules. You might look for one of those already written. I've written my own bridge between a site and vBulletin. Not for the timid, but if you've got some experience you should be able to hack something together fairly quickly. I've done some for various different forums in the past. An easy way to handle it is to just work out what the forms need for data (like the login form, or registration form) and then simply send that data to the URL that normally processes it in the forum. If you're lucky, the forum will already be able to handle AJAX requests or something, which makes this even easier. It depends how deeply you need to integrate it. Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462499 Share on other sites More sharing options...
dalecosp Posted December 17, 2013 Share Posted December 17, 2013 I've done some for various different forums in the past. An easy way to handle it is to just work out what the forms need for data (like the login form, or registration form) and then simply send that data to the URL that normally processes it in the forum. If you're lucky, the forum will already be able to handle AJAX requests or something, which makes this even easier. It depends how deeply you need to integrate it. True, and thanks. cURL can sometimes be leveraged in this use case, as well, as you imply. The really knotty parts are things like cookie management (you'll typically have two you need to keep track of), and session management, which for some gadawful reason lots of people like to stick in the DB. Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462558 Share on other sites More sharing options...
scootstah Posted December 17, 2013 Share Posted December 17, 2013 and session management, which for some gadawful reason lots of people like to stick in the DB. Actually, there is good reasons behind that. On shared hosting, it can be more secure. It's also sometimes faster, and easier to cluster. You also have better control over session life/persistence. Quote Link to comment https://forums.phpfreaks.com/topic/284808-php-question-need-advice/#findComment-1462570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.