I think that would be the best route, where people who register without
Connect would have to verify their e-mail address, and people who
register with Connect do not since we are using Facebook, Google or
twitter as a "trusted identity provider" and we typically do not have
their e-mail address. If a user who initially registered with Connect
ever wants to add their e-mail address, the forum would go through the
procedure of verifying it (just like it was an e-mail change).
Both Connect and non-Connect users would be able to manage their forum
account like normal, change their profiles, add or change their e-mail address, even being able to request a password (assuming
they bothered to add an e-mail to their account).
Implementation:
How this would be implemented would be pretty easy and could actually
be just a page not connected to the forum at all (other than calling
the forum's common include to access its variables). [Although it
would be nice if it was integrated into the forum registration process
itself.]
When creating an account, a user would be given the option to register
normally or use one of the available Connect services. If they select
a Connect Service, they go to a page where they can login using
Connect. Once logged in with Connect, it redirects to a page to see if
this Connect user has ever logged in before with that account (by checking for a record stored in a table in the
database).
-
If they have not, then:
- It asks them if they have an existing account, and asks them to login to associate their Connect account with their forum account*, otherwise:
- It directs them to a page where they must enter required information, such as a forum username. If using option 3, that is actually all we would need. (We could optionally ask for an e-mail, but we would have to let them know that they have to verify it if they do, like a regular non-Connect user.) Optionally ask for other profile fields to be filled in at the same time.
- When the page is submitted, it would create a user in the forum database with or without an e-mail address, and set the user to verified if they did not provide an e-mail address. (For security, I think all e-mail changes should always be verified, unless the Connect provider gives us a verified e-mail address we can insert into the system.) It also would record in a separate table** the Connect ID and the Forum user ID, linking the two (or three or four, allowing them to connect more than one Connect account).
- It redirects them back to the page where they came from.
- If they have logged in before, then it simply logs them in and sets them logged into the forum, and redirects them back to the appropriate page (preferably the same page they came from when they initially clicked register).
So this is something that could actually be made without touching any of the forum code at all, although it would require the Connect Register page to directly modify the forum's database.
Some Notes:*Users should be told that if they have an existing account, they should login FIRST, and then associate their Connect ID with their existing account. Otherwise a second forum account would be created when they login with Connect.
**Using a separate table allows Connect information to be stored separately, so it does not interfere with the forum database. (Important if this is a mod, and not included in Web Wiz Forums). It also allows you to associate multiple Connect/identity providers to one account. That way you can do mashups with Facebook, Twitter and Google Friend Connect data all on one account, for example.
Edited by wistex - 18 December 2009 at 11:49am