![]() |
Redirect after login / logout to previous page
Hi!
I'm trying to integrate vBulletin with my site, which was done with Rails. I want to use vBulletin's login system to the whole site, so users won't need to login twice (forum and site). So I'm planning putting a login box that would send user's name and password to vbulletin's login system and redirect the user back to where they submitted the form (the previous page, in my site). For the logout procedure, I have another question besides redirection. How "logouthash" is generated? I'd like to reproduce this hash using Rails. Thanks for your atention and sorry for my poor english. |
PHP Code:
|
Thanks for your reply.
But unfortunately I found something different at functions.php: PHP Code:
Perhaps I'm not understanding what is going on around the last line. =& means that $user['logouthash'] is the same as $user['securitytoken'], and not a copy (so, no big deal). Am I right? |
Sorry looking at 3.7.0 and not 3.7.1.
Yes =& means it is the same and if a change is made it either it is made to the other I believe. |
"=&" means to pass-by-reference and not pass-by-value.
|
Well, I managed to get some idea of how the logouthash is made by following the code you posted:
PHP Code:
And, I still have no clues how to redirect after login / logout, so users could login/logout from outside the forum and return to the same page. I promess that I'll retribute this favor by posting a How-to integrate vBulletin with Ruby on Rails. As there is no forum coded with Rails (Ruby), everybody still relies on php solutions like vBulletin, and integrating both would be worthy. |
TIMENOW is the current time in UNIX time. The login and logout already redirect the user to the page they were at.
|
Same prob here
|
What problem? Did you read all the replies?
|
Many thanks for your help !! I'm planning releasing a tutorial about the procedure of integrating Rails is vBulletin soon.
|
Great! we look forward to it.
--------------------- Quote:
|
All times are GMT. The time now is 04:53 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|