The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am trying to integrate vBulletin's login with our CMS login. In the login extension I am trying to get it to mimic the functionality as if you clicked the 'Remember Me' checkbox when logging onto vb's login page.
I am setting the cookies that vb uses and have verified that my cookies look exactly like the cookies that vb generated. But for some reason, vbulletin logs out all of our users based on the session expiration timing. I have looked at the data being inserted into the session table and mine matches what is insert by vb. I am at a complete loss as to why this isn't working and vb won't leave our users logged in. Any insight would be fantastic. Thanks in advance for your help. In case it helps, cookie calls: Code:
setcookie($cookie_prefix.'sessionhash', $now, 0, "/", $base_forum_url, 0, true); setcookie($cookie_prefix.'userid', $userid, time()+60*60*24*365, "/", $base_forum_url, 0, true); setcookie($cookie_prefix.'lastvisit', $timenow, time()+60*60*24*365, "/", $base_forum_url, 0, false); setcookie($cookie_prefix.'lastactivity', 0, time()+60*60*24*365, "/", $base_forum_url,0, false); setcookie($cookie_prefix.'password', $password, time()+60*60*24*365, "/", $base_forum_url, 0, true); $base_forum_url = .ourwebsite.com |
#2
|
|||
|
|||
![]()
Someone asked a similar question recently and it turned out to be the cookie path setting in the vb admin CP. It needs to be set to '/' or else it won't get the cookies. (Not sure if you're having the same problem because IIRC that problem was with people being logged out immediately).
|
#3
|
|||
|
|||
![]() Quote:
|
#4
|
|||
|
|||
![]()
The only other thing I can think of when looking at the session code is that because of this line:
Code:
if (md5($userinfo['password'] . COOKIE_SALT) == $password) { it looks like the password you set in the cookie needs to be md5($password . COOKIE_SALT) (sorry if you've already done that - after this I'm done ![]() |
#5
|
|||
|
|||
![]() Quote:
Final issue is that logging into the admincp goes into an infinite loop. Once again seems to be some kind of cookie problem. Blah. Thanks for your input so far kh, you rock. |
#6
|
|||
|
|||
![]() Quote:
--------------- Added [DATE]1312475427[/DATE] at [TIME]1312475427[/TIME] --------------- No worries. Just got it working - I had got my variables confused lol. I'm not having any problems logging into admin panel though. |
#7
|
||||
|
||||
![]()
What CMS are you using? Is it custom made, or by a company? The reason I ask, is if it's custom made, then it would almost just be easier to use integrate the vb systems into it directly. This will allow you to use the same cookie for everything, which would just be the cookie vb set itself.
I don't mess around with the Remember Me settings, but i just used something like: Code:
<form action="*forum_url*/login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"> <script type="text/javascript" src="*forum_url*/clientscript/vbulletin_md5.js"></script> <label for="user">Username:</label><br /> <input name="vb_login_username" size="15" accesskey="u" type="text" /><br /> <label for="pass">Password:</label><br /> <input name="vb_login_password" type="password" size="15" /><br /> <input name="s" value="" type="hidden"> <input name="do" value="login" type="hidden"> <input name="vb_login_md5password" type="hidden"> <input name="vb_login_md5password_utf" type="hidden"> <input type="image" src="http://www.divineshadowsonline.com/images/login.png" accesskey="s" alt="Login"> </form> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|