Forum OpenACS Development: Elimination of email as center of OACS registration.

On my site, I have made many changes to the OACS core and have gotten rid of the need for email to register for an OACS site.

Basically I moved email out of parties (where it doesn't belong) and moved it into users (where it sort of belongs). I also added a field called login_id which is now the unique way to be identified.

I have some notes at: http://jongriffin.com/static/openacs/no-email/no-email

Right now, I don't have the new-users working, but existing users are migrated and email is stuffed into login_id.

I have upgrade scripts for PG but not Oracle as I want it all to work in PG before I port to Oracle.

I just need to rewrite the user__new and person__new and that should work. I am also name spacing and cleaning up some of the files.

If anyone is interested in helping test/code this let me know. It has always been a problem for me that registered users are required to use an email address so it is time for OACS to not require this. Hopefully with all the upgrade scripts it should be able to eventually be added to a release.

One caveat, use cc_users and don't query parties,persons, users seperate and it will make your life much easier.

Collapse
Posted by Don Baccus on
e-mail should be in persons, I should think.

This should also be configurable ... a large percentage of our  site developers don't seem to have a problem with e-mail being required.  If e-mail verification is required for registration, then they'll need to provide an e-mail address and if you have a separate login name and e-mail address it forces the registering user to add two pieces of information where today one suffices.

Collapse
Posted by Jon Griffin on
It is configurable by a parameter in my setup. An easy way to deal with it (unless someone really wants to do a lot of work) is to have login_id be an email if the site admin wants it. Otherwise you would need two sets of user_adds and etc.

I agree that email should be in person, if and only if it isn't forced to be unique as many people share email addresses. I will change that and try it out, shouldn't be too difficult.

I would also bet that any large site running OACS that requires email will have many bogus (i.e. bill@microsoft.com) email address, at least that has been my experience.

Configurability is good.  But from a user's standpoint I rather like sites that use email as login key.  Otherwise I have to guess which of the usernames I use hasn't been taken yet at that site, and if it's a site I visit infrequently, I have to go through the same guessing process when I come back.

(IMO it's rather silly of people to share a mailbox in the 21st century when you can get free webmail at dozens of sites and even free IMAP accounts at some.  Plus all the major ISPs offer multiple boxes per account...)

Collapse
Posted by Randy Ferrer on

Jon - I read with great interest your changes to the registration. I would like to assist in testing if you still want the help. I am building a site where I have opted to require the user to complete registration by clicking on the link from the acs mail sent after initial registration. I don't like it much, but it's the only way right now to decrease junk registrations. I have been considering your solution though and was planning to experiment with this in a very short time. It's cool that you have started to do so already. 😊 BTW - I also need to implement a way to gather other viewer information. Any ideas as to what is the best way to do this would be appreciated. I have asked several times and can't seem to get any answers. What methods are people using to gather addresses, phone numbers etc? Any assistance here would be appreciated.

Collapse
Posted by Jon Griffin on
Jonathon,

Silly or not many people still share mailboxes. That is a fact of life.

One of the reasons I started getting serious about this is that my changes for HR-XML compatibility and contacts become kludges when you are required to have a unique address for each party. (Another reason is a friends site that wants anonomity for its users).

I will flesh this out some more tomorrow and throw a preliminary patch together. Be warned, it requires PG 7.3 as I do some drop columns etc that don't work in earlier versions.

Randy,

As far as getting other information, I would just have a link that requests the info. It seems like you are asking for contact info and if you are using PG you can look at the packages on my site. The Oracle versions are just about done and I hope to have them tested by the weekend.

Collapse
Posted by Jon Griffin on
One other thought, there is nothing from stopping you from using your email address as a login_id. It is just a varchar.
Out of curiosity, why didn't you offer both way's to login. Shouldn't be that hard to check if there is an "@" sign in the username, if it is probe against the email address, otherwise directly probe against login_id. If probe against email fails, probe again against login_id. Or do a "where email=:my_login_field or login_id=:my_login_field".

Anyway, we need to do this for one of our sites, and I though adding login_id (nickname, screenname, whatever you want to call it) to parties as well. Would this be cool with the core team ?

Collapse
Posted by Lars Pind on
We're currently implementing external authentication, and part of that is to add a 'username' column to users, since not all authentication servers use email as the unique identifier.

So I'm already in progress doing this on HEAD (nothing committed yet). We should definitely coordinate.

/Lars

Collapse
Posted by Dave Hwang on
A couple of comments: First, I like using email as a user's login id, simply because it's easier to remember because it's more likely to be unique than a screen name I compete for with everyone else who uses the site. However, in practice, I've found several problems with using email as the unique login:
  • In these days of free email accounts flooded with spam, my users tend to forget which of their many email address they used to register, and will re-register. This totally messes up all the groups memberships and associated permissions that we've set up for them.
  • A solution to the "forgot my email" problem is to let the user store multiple email addresses in his/her contact record (work, personal, whatever), and check against all of these emails for user login. Of course, we don't have a way to do that, and I had hacked together a user directory app for a site that needed it and modified the login scripts to check against all emails and hope for a match, but it is not fit for human consumption (it was for an ACS 4.2 site).
  • Also, in practice, it's nice to be able to create all your parties and set up groups and permissions before they ever log in, rather than waiting for them to register and giving them permissions afterward. However, this exposes a problem with the way OpenACS works today, in that parties cannot become users, because person.new() will fail the unique constraint for email. (see Bug #354 in the bugtracker for the way I worked around this problem). So the flow of parties becoming persons becoming users doesn't actually work right now.
  • I've also wished for an alternative to using email address as logins, in order to support people that don't have emails. For example, I've built a site for my church, and I'd like to do some personalized, kid-centric content, but I can't count on children having email addresses. Email should go to the parent, but the login should belong to the child. I've also got some people sharing email addresses (i.e. the family email), so email to identify individuals also breaks down in that case.

Now for my suggestions:

  • a quick and dirty change would be use the "screen_name" field in the users table as the login key rather than email in parties. This would be minimal change, but not really "fixing" the data model. Then when the user provides an email address, we can check to see if that party already exists change its party_id to the user_id
  • A more comprehensive solution would be to implement a more complete user directory/contact info datamodel (maybe HR-XML, maybe something like Outlook or Palm has), then generalize the authentication scheme to correlate the person trying to login with a record in the database. Basically, login is a two stage process: first, you ask the user for enough information (email, screen name, first/last name and birthday, phone-number, etc) to get it down to one contact record, and therefore one password, and then authenticate this person against it. It may have to be interactive (multiple people with the same name, or email wasn't found, try another) and redirect to registration if no matching record exists.

Maybe we should make changes that would fit with Lars' external authentication module which would still require a generalized way of asking for specific info so we can authenticate the user, either using external auth or entirely within ACS.

Collapse
Posted by Jon Griffin on
Unless the data model is changed, email will always be unique at the least.
Using login_id in no way precludes you from using email as your unique identifier. It really is extremely rare that I see a site that still uses email for any type of authentication (other than sending lost passwords). Yahoo, Amazon, ebay all use login ID's. We are way behind the norm and it really could be considered a p3p problem as we store and require email.

I don't have a problem with keeping email as a login for those who want it, the main problem is the data model itself is not correct and now that PG supports dropping columns and it cascades correctly we can fix it.

The HR-XML contacts info is in HEAD (last I checked) or on my site for those who want to see it.

Lars, I will get with you about your vision also. I am going to hack on this a little more today.

Collapse
Posted by Don Baccus on
Requiring e-mail may be rare yet we've rarely had complaints, so for a very large number of clients apparently it's not a problem.

Anyway .... bottom line is we need

1. to allow for the e-mail requirement for those who still like it.

2. to allow for arbitrary user names for those who like that and, as Lars points out, for working with external authentication servers.

3. if a site decides to allow for arbitrary user names it should still be possible to demand an e-mail address in order to allow for e-mail verification of registrations to cut down on bogus spamish registrations.

4. If we get rid of the unique e-mail restriction, doesn't this make it possible in scenario #3 for someone to set up one mail account with a 'bot answering it, then use that one mail account to register and verify an arbitrary number of users with login names like "a", "b", etc?  Imagine for instance that Greenpeace decides to move its discussion server from Zope to OpenACS, not entirely far-fetched since Bruno's been mumbling about it for over a year.  Greenpeace is an organization that's likely to be a target for vandals.  We need to think in these terms ...

Hi Don, good point (number 4), I think we should strive for keeping the email unique OR get acs-mail to only send an email once to a particular email address (let notification or the mailinglist manager handle this). In any case, in the scenario where we need it, we assume unique emails and will coordinate with Lars there.
Collapse
Posted by Tom Jackson on

I had thought there was some discussion in the past about making login subsite aware. No new info would be supplied by the user, but a separate subsite or domain field would be used to create a unique user account.

If this were done, you could possibly use this domain, or some configurable domain as the default following the @. If no @ were supplied, the default would be added to the end.

However, in this case, you would still want a real email address for the user.

The main datamodel problem is that in the real world, email addresses are not unique enough to distinguish users, or even accounts. Also, users are often wary of providing a real email address until they become familiar with a site.

Maybe if users could create an account without an email, and somehow we could use the user_id cookie to remind them on occasion of the importance of providing an email address. This might include some function that would also notify the user when their email bounces (by noticing the bounced email). Email addresses are vital maintainance of user communities, and users who do not provide them are not really contributing to the community in the long term.

If the site also included a forwarding service for the local subsite account, i.e.:

tom.jackson@subsite.openacs.org --> tom@example.com
even logged in users would not be able to obtain the users real email address, but they could send them email. If this information was abused, it would be much easier to identify and handle.