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... :/

Comments

crimsondryad’s picture

The 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...).

lightsurge’s picture

Agreed @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

lightsurge’s picture

Actually, correcting myself, it seems there's another, although this one doesn't remove the email requirement:

http://drupal.org/project/password-reset

izkreny’s picture

I 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).

izkreny’s picture

Status: Active » Needs review

I 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.

Andrea C’s picture

Right 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

ezra-g’s picture

Title: As a community site builder, I'd like to allow users to register with only e-mail address and full name » Ability to configure whether username or Full Name is displayed
Status: Needs review » Active

Thanks, 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).

ezra-g’s picture

Priority: Normal » Major

Moving to major since profile fields and display are a foundational element of the distribution.

Roger34’s picture

I 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.

crimsondryad’s picture

ezra-g, sounds like a plan.

soul88’s picture

StatusFileSize
new2.21 KB
soul88’s picture

Created a feautre that creates those 2 fields. To start something with.

soul88’s picture

StatusFileSize
new1.98 KB

The module, that depends on the feature and influences how should the username be displayed accorting to the settings in admin interface.

izkreny’s picture

@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? :)

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new1.4 KB

Thanks, @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.

ezra-g’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary with current status of the work.