Automatically generate a password on user creation

Created on 19 October 2024, 3 months ago

Problem/Motivation

Asking the admin to set a password on user creation is confusing for new users, because it's not a common pattern and leaves them somewhat unsure of what to do. If you opt to notify the user, you have set a password for no reason; if you opted not to or forgot, you then have to send them the password somehow, probably via email, which is not secure. The workaround is of course for the admin to generate a password reset email for the user, which is fine if you are experienced but very, very strange to new users.

Proposed resolution

We should hide the password field by default on the user creation form, and generate a password automatically when a user is created.

I've tested https://www.drupal.org/project/genpass β†’ and it does exactly what I wanted, and comes with several config options to make it flexible for sites that would prefer something else.

For the default setup I would propose that we enable this module with 'Admins cannot set a password when creating or editing an account.' selected.

Remaining tasks

Confirm this is a good idea
Add it to the base recipe
Review
Commit

User interface changes

Hides the password field on user creation by default.

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Component

Base Recipe

Created by

πŸ‡¦πŸ‡ΊAustralia pameeela

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024