How to integrate vBulletin auth with my site?

醉酒当歌 提交于 2019-12-09 07:14:16

问题


I need to use vBulletin auth system on the rest of my site. Does vB has any APIs for that?

Im expecting to find something like that:

if($vBulletin->isAuthenticated())
{
    // user authenticated
}

In case of vB does not have such API, is there any other ways to check if user is authenticated?


回答1:


Basically, to ensure the user is logged in you need to look into cookies and match the session hash from vBulletin DB.

This link has good information on that matter: http://www.saurdo.com/11/11/utilizing-the-vbulletin-database-in-your-main-site

More information can be found in my answer to this similar question: Django / vBulletin single sign on




回答2:


A plugin has been written for 3.7 which you can find here and an updated version for 4 is here.

I don't think there's an API which has been developed by vBulletin which allows you to do it, but these mods seem to do the trick. You could look through the code to see how it has been done if you want to use a different method.



来源:https://stackoverflow.com/questions/2476975/how-to-integrate-vbulletin-auth-with-my-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!