Add Action Plugin to set a random password for existing user(s)

Created on 4 February 2020, over 4 years ago
Updated 18 August 2023, 10 months ago

Problem/Motivation

Need the ability to set good random passwords for existing users. Genpass is presently only available when creating new users.

Proposed resolution

Add a core Action Plugin of type "user" which generates a password by calling genpass_generate() and saves it to the account. New password is display to the admin/user who triggered the Action.

Remaining tasks

Potentially use an Advanced Action to allow for configuring user notification, display of password to user etc.

User interface changes

"Set new random password for user(s)" now available as Action on the core People list (/admin/people).

API changes

None.

Data model changes

None.

Release notes snippet

Added a core Action Plugin to set an existing user(s) passwords using the configured genpass_generate algorithm.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia ELC

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia ELC

    Changing target branch.

    Given the patch on ✨ Optionally hide the password field for admins Fixed has an update which is after this one, this patch is obviously actively being used with the module so we can assume this is RTBC.

    This issue will need to be merged in first to avoid the very highly unlikely happenstance of someone running the other update (8003) before this one.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update 10 months ago
    1 pass
  • @elc opened merge request.
    • ELC β†’ committed 95ad4573 on 2.0.x
      Issue #3110927 by ELC, VladimirAus: Add Action Plugin to set a random...
  • Issue was unassigned.
  • Status changed to Fixed 10 months ago
  • πŸ‡¦πŸ‡ΊAustralia ELC

    For VBO, the ViewsBulkOperationsActionBase extends ActionBase, which is meant to meant that this action is VBO compatible: ref β†’

    No need to DI Messenger into ActionBase; it already has it and translate as a trait.

    Moved system.action.genpass_set_random_password.yml to config/optional as it is technically for a different module, and it got in the way of installing.

    Added hook_uninstall in the event system.action.genpass_set_random_password was added during 8002 update as the config dependencies are not correctly set and it then not removed.

    Use getEditable->setData to install system.action.genpass_set_random_password instead of writing directly to config. Direct write didn't enforce that caches be flushed/rebuilt upon install it seemed.

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

Production build 0.69.0 2024