PDA

View Full Version : Automatically Logging a user in


JBankson
06-14-2006, 09:45 PM
We have a website where our users sign up for membership. In doing so we are creating their V-Bulletin users automatically behind the scenes so that they do not have to register for our site AND register for the forums. What would be really nice is when the user logs in to our membership area if we could automatically log them in for V-Bulletin as well so that if they visit that area it is seemless. Right now they would have to login twice, once for the members only area and once to login to V-bulletin.

Is there a way to set the cookie that v-bulletin expects? Or is it possible to call a method that will log the user in (kind of like how we create the user)?

Thanks!

calorie
06-21-2006, 06:56 PM
What method do you use to tell whether a user is logged into the membership area?

bigbobchamp
07-17-2007, 12:16 AM
Does anyone have a solution to the OP's question? I'm sure I'm one of many who are looking to do this.

Edit: found this -> https://vborg.vbsupport.ru/showthread.php?t=108026

patrickb
07-17-2007, 06:06 AM
My solution to the problem is 2-fold.

First, I assume that the authentication is done by your own website.

If the user is authenticated, I do 2 things :

Create sessionhash and a userid cookies on the user's client
Add the session information to the database


I basically mimic what vBulletin does. You can look into the functions_login.php file and dig through it to see what to do exactly.