Hello

This module is changing the username field to display name.
This shouldn't be happening; it's not what the project page details.

Plus there are modules for this:
https://www.drupal.org/project/realname
https://www.drupal.org/project/alt_login

This is causing confusion to users. There are already too much overlapping in features in the various user modules.

Please remove this feature from v 7.x and 8.x.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lpalgarvio created an issue. See original summary.

greggles’s picture

I agree with the goal here. I probably won't work on it myself, but could review and commit a patch.

xurizaemon’s picture

benjy’s picture

+++ b/email_registration.module
@@ -178,13 +178,6 @@ function email_registration_user_login_validate($form, FormStateInterface $form_
-function email_registration_form_user_form_alter(&$form, FormStateInterface $form_state) {
-  $form['account']['name']['#title'] = t('Display name');
-}

How about hiding the username and simply keeping it in sync with the email? That's normally the desired behaviour when using this module.

idimopoulos’s picture

How about hiding the username and simply keeping it in sync with the email? That's normally the desired behaviour when using this module.

The problem with completely hiding the username is that we are forcing the user towards a functionality that is not needed for an email registration.
Some of the problems:

  • The permission Change own username is rendered useless. An administrator can actually hide it either by permission or by hiding it in the form itself.
  • We ruin the flow of the website. if the module alters and 'cleanups' the username without settings to disable it, and then prints that username to all comments and content (because the site might be working like that), it is not a good user experience.

I find this patch fine. In general it is quite weird that the module is altering labels whatsoever.
The patch works fine for me in 8.x-1.x. Quite weird as well that this was not tested since the label was altered.

benjy’s picture

But if you user email_registration you end up with ugly generated username, you don't want your users to see that in the form? Same argument for your point about printing the username been a bad experience.

When I use this module I normally hide the username field and then have another "Full Name" field that I add to the user entity to use to render the display name of the account.

claudiu.cristea’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

@benjy, if you want to allow, both, user name and E-mail (see https://www.drupal.org/project/email_registration/issues/2214225), then the username field should be there and not hidden. I think this is good to go as it is. Eventually, hiding the username in certain conditions should be treated in a separate issue.

RTBC for 8.x-1.x version of the patch (7.x-1.x to be reviewed after this is committed).

Sutharsan’s picture

+1 RTBC (for solution and patch)

andypost’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev

Commited to 8.x & now commiting to 7.x

  • andypost committed 900f141 on 7.x-1.x authored by xurizaemon
    Issue #2871604 by xurizaemon, andypost: Display name vs Username
    
andypost’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in 7.x as well

Status: Fixed » Closed (fixed)

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