Improve user authentication documentation
| Project: | Drupal vB |
| Version: | 6.x-2.0 |
| Component: | Documentation |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Hi every one :)
Two things first... A- Thanks a lot for the work and life of drupalvb, i really hope that VB integration in Drupal will continue.
B- Please scuse my bad english, i'll try to make sense but tell me when it doesn't ^^
So here's the trouble. I've installed a fresh Drupal 6.6, a brand new too VBulletin 3.7 and of course DrupalVB.
Everything seems fine except that when trying to Log out from Drup' and VB at the same time is impossible.
I tryed login out from Drup', still connected in VB.
Tryed login out from VB, still connected in Drupal.
Tryed using DrupalVB's link in the account block, still connected in VB.
Could it be because of a bad use of cookies by drupalvb?
It's the same problem in several navigators: Firefox, Opera, Konkeror.
Is it an isolated bug or is it the same for everyone ?
Every help welcome :)
Thanks

#1
Three issues here:
a) You need to use the same cookie domain in Drupal and vBulletin. See README.txt for further information.
b) To properly logout a user in vBulletin, you should replace Drupal's regular logout link with one that points to the path
drupalvb/logout. This is DrupalvB's logout handler, which will clear a user's cookies in front of logging out in Drupal.c) Currently, DrupalvB is a one-way integration only. So to logout a user from vB, you have to replace the logout link in vB's templates with a link that points to Drupal's logout path, i.e.
drupalvb/logout. Otherwise, Drupal does not know what happens in vB, and your users will still be logged in after logging out in vB.#2
Thanks a lot Sun!
Maybe the read me wasn't explicit enough for such a newbee i am ^^
If this can help such beginners:
a) For giving the same cookie domain to Drupal and VB...
In Drupal, /sites/default/settings.php find, activate and complete:
$cookie_domain = 'your domain';
In VB administration : vBulletin Options > Cookies and HTTP Header Options > complete Cookie Domain part using Custom Setting and giving your domain.
b) For the proper logout link...
Well i use the old ?q=logout of drupal and it works just fine since i've changed cookies domain. /drupalvb/logout ? well there's absolutly nothing in my drupalvb's module folder that sounds like logout. Maybe is it a difference between drupalvb for drupal 5 or 6.
c) Changing VB's logout link...
I rode it in the read me and i would enjoy this feature but i really don't know how to. Two days that i'm losing myself searching in VB support forums and my english didn't helped me to find a clue. If you know it could you tell ?
Like this all helps about logout will be there. :)
#3
a) Isn't that exactly what is stated in README.txt?
b) If you do not use clean URLs, then of course the logout link has to be index.php?q=drupalvb/logout
c) The logout link is usually located in the header template of your vB theme. You can override that (global) template to change the link.
#4
a) Indeed i found it in the customization part of the read me. I didn't tryed this because it seemed to be presented as how to configure drupalvb if "you want to run your forums on a subdomain". And i didn't tryed it because the warning was, in a way, telling me to not do it if i wasn't sure of what i was doing.
With my limited knowledge the readme would have been helpfull if there was explained that to properly finish the installation i would have to set coockies as told.
b) thanks again for this precision i wont forget it ^^
c) Great thanks one more time !
Have a nice weeck-end :)
#5
Well, in front of closing this issue, I'd like to take an action, if necessary.
So, how would you propose to fix this documentation issue?
The reason for moving it into the customization section and adding that cautious notice was that a wrongly defined cookie domain can lead to a completely broken user authentication, both in Drupal and vBulletin. If the cookie domain is set to a wrong value, all users are immediately logged out, and can no longer login, including super administrators.
#6
My two cents: I thought the README did a good job of documenting how to sort out the cookie issue. However, if some confusion remains, and this thread has helped clear that, why not just provide a link to this thread in the README?
#7
Committed attached patch to all branches.
#8
Automatically closed -- issue fixed for two weeks with no activity.
#9
I cannot figure out how to do the following... I cannot find how to replace drupal's regular logout link, and i cannot find the one for vB either... Please advice.
b) To properly logout a user in vBulletin, you should replace Drupal's regular logout link with one that points to the path drupalvb/logout. This is DrupalvB's logout handler, which will clear a user's cookies in front of logging out in Drupal.
c) Currently, DrupalvB is a one-way integration only. So to logout a user from vB, you have to replace the logout link in vB's templates with a link that points to Drupal's logout path, i.e. drupalvb/logout. Otherwise, Drupal does not know what happens in vB, and your users will still be logged in after logging out in vB.