Gossamer Forum
Quote Reply
AutoLogin plugin
Howdy All,

I've got a new plugin up and running on my site, but wanted to run it by folks using GForum to see if anyone would like to see additional features before making it available.

Check out this thread for some background:
http://www.gossamer-threads.com/...forum_view_collapsed

Basically I have a user registration system in place which gives cookies when my users sign in. I needed a way for my users to be able to seamlessly move into GForum without having to register all over again. In addition I have several mail lists that I have been archiving to GForum for some time, so many of my users already have their e-mail addresses registered in GForum via the MailArc plugin.

So what the plugin does is this... when a user visits it checks for a cookie called "email". If they don't have a cookie then they are logged in as guest. If the cookie is set it checks for a matching enabled GForum user and simply logs them in. If the user exists but is not enabled (ie was added via MailArc) it enables them and sets their password to some generic value. If the user does not exist it creates a new user using their email cookie value as the username. So essentially all of my users that use the forums will end up with their email address as a username. It does all of this through the authenticate hook. The plugin allows you to specify the value of the cookie name to use a the GForum username.

In general, I'm looking for any comments or suggestions on improving this set-up. Or any features that people would like to see to make this plugin generally more useful.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
So, is this a plugin that anybody else would even be interested in?
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
Yes Smile

I think so, at least. I'm not quite sure I understand the plugin though ...

I too run mailinglists with the archiver plugin, and have found a problem with members not be "recognised". If the plugin could solve this, great.

Having email addresses as usernames would be OK, but one thing that occurs to me then, is that you then really should show usernames in the forums. I've been trying to modify templates to only show Real Name, but that is not easily done.

I decided to wait and see what GCommunity will bring. Alex has sort of given the impression that it would ...
Quote Reply
Re: [gotze] AutoLogin plugin In reply to
I think there are a couple of potential uses for this plugin, both assume that you have some kind of authentication scheme for users of your website (other than GForum) and that you give your users cookies.

Case 1) You are using MailArc and you have a user database that includes their e-mail addresses: When MailArc imports a message into GForum it creates a disabled user with the senders e-mail address (if a user with that e-mail address doesn't already exist). So if you give your users a cookie with their e-mail address when they log into your site the AutoLogin plugin will automatically log them into GForum using their e-mail address as the username. If they are disabled (ie it is their first visit to GForum other than posting to your maillist) they will be enabled and an arbitrary password set. If they do not have a GForum account (ie they have not yet posted a message to one of your maillists) an account will be created for them using their e-mail cookie as the username.

Case 2) You aren't using MailArc and you have a user database that includes a field that you want to use as their GForum username: Give your users a cookie with the field that you want to use as their GForum username when they log into your website. When your users visit GForum AutoLogin will create an account for them using the username cookie, if it is their first visit, or just log them in if it is a return visit. So it is essentially an easy way to authenticate your users into GForum using an existing authentication scheme (assuming you use cookies or can add cookies to your existing scheme).

In either case you would want to modify the GForum login template so that they log into your website, not directly into GForum. OR change the header "Login" link so that it points at a login page for your website.

The only concern I can think of is how to handle it when users change their e-mail address. As is, a new account would be created for them in GForum with each email change. No effort is made to track the change so defunct users will accumulate as users change their email addresses. I'm not sure how big a problem this is, but doesn't seem very elegant. At mininum users would need to understand that they would have to set up their profiles all over again everytime they changed their email address.

Hope that helps.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
I saw ur Potings about a global login.

I search something like this but I want to use the Gforum login screen for the whole site.

It should look something like this:

Login at the Gforum login.

The first page shown is a startpage of my site (e.g. news) not the forum

If you now wander around on the site you never have to login again.

(because the cookie, has been set by the gforum login screen is recognized by all pages (startpage,chat,gforum,...)

My question now is how i split the login screen from the other parts of the forum?

Give me a hind :)



p.s. sorry for the bad english I'am only a tired german *g*
Quote Reply
Re: [VITAS] AutoLogin plugin In reply to
Vitas, it sounds like you just need to give your users access to your gforum login on your home page, no? The easiest way to do this would be to navigate to the gforum login page and copy the source code for the login form and then place that on your home page. However, I think this will redirect your users into gforum after signing in, which you may not want. I'm not sure how you can specify that they return to your home page after signing in. Perhaps if you change the hidden "url" input tag to the target you want?
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
I would be interested in using your Autologin plugin. Where can I find it?

Lauri
Quote Reply
Re: [lpa] AutoLogin plugin In reply to
Sorry for the delay. I'm not sure how to get the plugin to show up in the list of plugins on Gossamer Threads. Perhaps I send it to them and they post is?

I have made it available at the following URL so that you can "Install from URL" on the Plugin Download page in your admin:

http://www.seaturtle.org/junk/AutoLogin.tar
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
This is a great plugin! Thanks for providing it.

I've got it set up on my forum and it appears to be working splendidly. The only tricky part for me was getting a logout feature to work as well (where the login cookie is deleted, essentially). I found that I would delete the cookie but the user would stay logged in. I fixed this, though, by setting the "session_timeout" parameter in the admin panel to .01 (zero didn't work). Is that the best way to accomplish that, do you think? At any rate, it works, and I'm quite happy with it.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
Nice Plugin--I'm tinkering around with it for something similar that I need. One minor glitch I caught (maybe it's new to 1.1.8) is the do_func call circa line 137. It wasn't working for me, so I changed it to GForum::do_func, and that worked.

'hope that helps

thanks for the plugin!

Brian Fujito
http://www.christianity.com
Quote Reply
Re: [bfuj] AutoLogin plugin In reply to
Thanks for the heads up. It seemed to be working fine for me under 1.1.8, but I made the change anyway, just in case...

cheers,
Michael Coyne
seaturtle.org
Quote Reply
Re: [hennagaijin] AutoLogin plugin In reply to
Quote:
I found that I would delete the cookie but the user would stay logged in.

Right, you log out of the GF session, but the plugin logs you right back in if the cookie used by the plugin still exists.

I could probably set the plugin up so that it modifies the logout subroutine such that it deletes the cookie used by the plugin as well. I'll take a look. It would require that there be a hook to logout, not sure if there is one...

cheers,
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] AutoLogin plugin In reply to
Greetings Michael,

Your plugin sounds a lot like something that i am looking for.

"Basically I have a user registration system in place which gives cookies when my users sign in."

What is this registration system you have? I would like to put together a site with gforum, gmail, fileman(or web based ftp gui), a mapserver and one other script that allows users to create a personal webpage. I would like one signup process for the whole package, and an autologin for folks so that can hop from one function to another. Can you point me in the right direction? Is this plug-in part of the solution?

thanks for your help,

bob