The work in this issue is to export a feature that will:
- Define the first and last name profile fields
- Let site-admins configure whether usernames or full names are displayed throughout the site. Either way, we'll still collect first and last name when users register.
- Show the appropriate fields on the user registration form:
So, regardless of which mode the site is in, the user registration form would always have:
- Email address
- First name
- Last name
If we're displaying usernames on the site, we'd also let users specify their username on the user registration form.
http://drupal.org/project/realname is simplified in Drupal7, is mostly Field API + Token + Views integration + some glue code, co-maintained by Dave Reid, and running on 7,000 D7 sites with an increasing trend.
Seems like we'd likely use a module such as LoginToboggan or some lightweight Commons-specific code to let folks log in with their email address (as opposed to username).
--
Original issue summary:
The Commons MVP requirements state that site builders should have "The ability to configure whether usernames or full names are displayed throught the site".
IMHO, logical predecessor of above mentioned task would be to allow users to register with only e-mail address and full name.
In above mentioned case we would remove Drupal username from the game and avoid complexity that use of usernames provide in (real world communities) sites that want to use only real names.
As far as I can see, that can be achived using Full name (see #1555038: Use core Entity API for User profile fields issue) profile field with help from http://drupal.org/project/logintoboggan and http://drupal.org/project/realname_registration modules.
Another scenario is non-unique usernames (which could solve all this real names fuss) in Drupal (patched?) core, but, this is probably only road to hell... :/
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 1557764-commons-fullname.patch | 1.4 KB | ezra-g |
| #14 | commons_username.zip | 1.98 KB | soul88 |
| #12 | first_last_name_fields-7.x-1.0-alpha0.zip | 2.21 KB | soul88 |
Comments
Comment #1
crimsondryad commentedThe road to hell is paved with good intentions. :P The minute we dictate that only email addresses are used, someone will find a valid reason why they shouldn't be ( for instance, schools with little kids who don't have email addresses ). Would this affect corporate users with SSO? I know a lot of organizations are using Windows AD integration and they auth with a username, not an email.
I like your idea though...I could see it being useful. Is there a way for a site administrator to configure the username settings themselves? I'm ok with forcing email and name so long as the admin has the option to change it to allow usernames ( and maybe not email? ... Devil's advocate...).
Comment #3
lightsurge commentedAgreed @crimsondryad especially as far as email goes. Working with schools, requiring email address has always been a bugbear for us... it would be nice to be able to use Commons for 'virtual classrooms', without having to set young students up with email addresses, which for a variety of reasons including safety of the child, it's often not feasible to do.
The only concrete reason we demand an email address is to provide a means of resetting a password. By which I mean, I realise contrib modules have grown around email address being required and therefore relying on it, but they never actually needed to, they could have relied on an internal messaging system that would optionally hook up to an email address instead.
Unfortunately, the only alternative method on drupal.org for resetting a password seems to have gone unsupported http://drupal.org/project/localemail
Comment #4
lightsurge commentedActually, correcting myself, it seems there's another, although this one doesn't remove the email requirement:
http://drupal.org/project/password-reset
Comment #5
izkreny commentedI really like Sing up page.
But, Login page is non-consistent because it is using username?
I suggest using e-mail for login - http://drupal.org/project/logintoboggan/ - it would be also nice to have a option to choose to only show e-mail, and not username and e-mail (AFAIK this is how it's at Login Toboggan 6.x).
Comment #6
izkreny commentedI created another issue regarding to Log in page: #1705584: As a community member, I'd like to be able to log in with only e-mail address and password.
According to interactive prototype this issue could be closed, because users are able to register/sign up with only with e-mail address and full name, but, as we had discussion about e-mail issue here, I will mark it as needs review.
Comment #7
Andrea C commentedRight crimsondryad, I think there are good reason to keep the username too. I wrote it in this post http://drupal.org/node/1705584#comment-6291918 in the new issue opened by Mario
Comment #8
ezra-g commentedThanks, all for your help in this and the related issues. I'm marking the following issues as duplicates of this one so that we can work on an integrated solution:
#1705584: As a community member, I'd like to be able to log in with only e-mail address and password
#912462: Add Real Names support to Drupal Commons
The integrated solution would:
- Define the first and last name profile fields
- Let site-admins configure whether usernames or full names are displayed throughout the site. Either way, we'll still collect first and last name when users register.
- Show the appropriate fields on the user registration form:
So, regardless of which mode the site is in, the user registration form would always have:
- Email address
- First name
- Last name
If we're displaying usernames on the site, we'd also let users specify their username on the user registration form.
http://drupal.org/project/realname is simplified in Drupal7, is mostly Field API + Token + Views integration + some glue code, co-maintained by Dave Reid, and running on 7,000 D7 sites with an increasing trend.
Seems like we'd likely use a module such as LoginToboggan or some lightweight Commons-specific code to let folks log in with their email address (as opposed to username).
Comment #9
ezra-g commentedMoving to major since profile fields and display are a foundational element of the distribution.
Comment #10
Roger34 commentedI think that is the way it should be. Those who would like to use first name last name with email address should be able to run the site without the mess of username. It may be good for company websites to use username, for others the former method is preferred. Even after installing logintoboggan I was scratching my head to get rid of the username. Good initiative ezra-g.
Comment #11
crimsondryad commentedezra-g, sounds like a plan.
Comment #12
soul88Comment #13
soul88Created a feautre that creates those 2 fields. To start something with.
Comment #14
soul88The module, that depends on the feature and influences how should the username be displayed accorting to the settings in admin interface.
Comment #15
izkreny commented@Soul88: Thx for the feature! I have one little request, if you you can provide it.
IMO it would be great if you could put this into your sandbox, so we can easily download/update it with GIT.
Whadda you think? :)
Comment #16
ezra-g commentedThanks, @Soul88 for the initial work here :D!
I've done a bit of refactoring that's posted here as a patch:
- Define a new Commons_profile_base module to define the first, last name and bio fields
- Change the machine names for the name fields to be name_first, name_last so that they'll sort near one another.
- Include optional configuration for the Realname module to use the first and last name fields when Realname is enabled. That way, if a site-admin wants their site to use full names, they can simply enable Realname and it will be automatically configured to use the profile fields with commons_profile_base.
- Include the Realname and Email registration modules for the above functionality, plus the ability to hide the username field on registration and let folks login with only email address. I chose Email_registration since it's significantly smaller in scope and the amount of code it brings into Commons versus Logintobbogan.
- Since Realname implements hook_username_alter(), we can build Views that include the core username field and count on those same Views working regardless of whether Realname is enabled or not, and displaying the name (username or full name) in the appropriate format.
We definitely want to make it easy for folks to configure whether full name or username is displayed on their site. I propose we tackle that as part of #1558174: Define installer setup tasks.
I think this gives us a good start to continue building from. I'll leave here for a bit for review so that folks can provide input on this approach.
Comment #17
ezra-g commentedThis is committed. http://drupalcode.org/project/commons.git/commit/9731952
Comment #18.0
(not verified) commentedUpdated issue summary with current status of the work.