Problem/Motivation

#3481627: Update user creation form to hide password and status fields when user is notified changes the default state of the "Email user with password setup instructions" checkbox on the add new user form to checked, and hides the password fields when it's checked.

I think this is desirable as the default state, but I'm concerned that sites that rely on the previous default may be negatively impacted.

Steps to reproduce

Apply change in #3481627: Update user creation form to hide password and status fields when user is notified. Go to add new user page. Verify "Email user with password setup instructions" is checked and password boxes are hidden.

Proposed resolution

Add a setting to a suitable settings page. I suggest "Basic site settings". Probably in a new "New user settings" field group.

I would make it a checkbox with a label like, "'Email user with password setup instructions' checked by default". I'm very happy for people to suggest a better label.

I think this should be checked by default, and there should be a config setting to match.

The new user form should set the default value of its checkbox to the setting.

There will need to be an upgrade hook to set the new setting for existing sites.

Remaining tasks

Agree this is a good idea
Update the form behaviour and create upgrade path
Update or add tests
Review
Commit

User interface changes

New checkbox on appropriate settings form.

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

TBD

Comments

lostcarpark created an issue. See original summary.

kae76’s picture

checkbox with a label like, "'Email user with password setup instructions' checked by default"

makes sense, can we add "When this enabled the password field is hidden"

and in the description area:
if unchecking on this setup page, this will persist across all user account creation. For any further new accounts the 'send new user email notification' will have to be manually enabled.

sergiur’s picture

would the best place for this setting be on /admin/config/people/accounts, next to other related settings?

lauriii’s picture

Status: Active » Closed (won't fix)

I’d say this is out of scope for core to provide a setting to. This could be either a contrib module or ECA configuration.

If a site doesn’t want to use email for inviting users, there’s already a setting for that.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

catch’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

If a site doesn’t want to use email for inviting users, there’s already a setting for that.

I'm not sure this is the case?

The account setting is 'require email verification for new users' but that applies to self sign-up, not administrator created accounts.

Are you saying that the form default should respect this setting (e.g. if new registrations are set not to require email registration, also default email notifications off for accounts created by the form)? If so that's not implemented in the other MR so could potentially be added here.