Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Auth_vBulletin and sessions?

Quote Reply
Auth_vBulletin and sessions?
I'm using the Auth_vBulletin plugin for user authentication on a Links site.

I am assuming that the Sessions table within Links is not used once the plugin is installed, as logged in users are determined by checking the vBulletin cookie.

I am interested in modifying this plugin so that the Sessions table maintains a list of logged in users. One of the weaknesses of the current system is once a user moves from the forums to the Links site they are not listed in the online users on the forum. It would be great to be able to determine the number of logged in users that are currently in the Links site (from within Links, and from vBulletin via a plugin).

For anyone that knows this plugin well (probably only Adrian Wink) - would I create any major problems anywhere if I added some code in sub auth_create_session to insert data into the Sessions table?

I have no idea how the Sessions table is cleaned out, mine has 2 entries in it that seem to have been there since installing the plugin Unsure.
Quote Reply
Re: [aus_dave] Auth_vBulletin and sessions? In reply to
I just found some code in Authenticate.pm that might be what I am looking for. I think it's time to set up a proper development site as I'm not keen to experiment with this and inflict the results on my users Laugh.
Quote Reply
Re: [aus_dave] Auth_vBulletin and sessions? In reply to
The session table is used by GT::Session::SQL, which when the plugin is installed, shouldn't be used at all, since all the session methods are overridden by the plugin.

Adrian
Quote Reply
Re: [brewt] Auth_vBulletin and sessions? In reply to
That's how I understand it - so is it possible to modify the plugin code to update the Session table as well?
Quote Reply
Re: [aus_dave] Auth_vBulletin and sessions? In reply to
Just copy the calls to GT::Session::SQL (in Authenticate.pm) into the plugin and it should do that.

Adrian

Last edited by:

brewt: Mar 7, 2006, 3:24 PM
Quote Reply
Re: [brewt] Auth_vBulletin and sessions? In reply to
Thanks Adrian, I will see if I can get something working.

Do I need to add 'use GT::Session::SQL;' to the start of the Auth_vBulletin plugin? I am ok with adapting bits and pieces of Perl but my understanding of how Links actually works with modules etc. is limited Unsure.
Quote Reply
Re: [aus_dave] Auth_vBulletin and sessions? In reply to
Yes you will need that.

Adrian
Quote Reply
Re: [brewt] Auth_vBulletin and sessions? In reply to
I've had a think about this and using the vBulletin session table is probably a better way to do this. If this is used the total number of online users can then be accessed across the whole site (links and forums).

Ideally I would like to be able to include the URL the user is browsing on the Links side in the session table. It may then be possible to modify the 'Who's Online' page in vBulletin to use standard phrases for what users are looking at in the the Links part of the site.

There are quite a few include files in vBulletin that handle the sessions so hopefully it is a case of adapting the relevant code and adding it to the Auth_Bulletin plugin.