Add action / views bulk operation to update existing users

Created on 11 August 2023, over 1 year ago
Updated 30 July 2024, 7 months ago

Problem/Motivation

Using this module on an existing project with many users it would be helpful to have a bulk operation / action in views to select multiple or all users and update their account name.

Steps to reproduce

Proposed resolution

Implement the bulk action / operation for users to update the account name. The operation itself already exists in the update hook.

This is how it works:

Similar request here for email_registration: 📌 Add action to regenerate username Closed: duplicate (that should also be finished)

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica
  • First commit to issue fork.
  • Status changed to Needs work over 1 year ago
  • 🇩🇪Germany Grevil

    No idea, I can't seem to get the action displayed... No idea, what I am not doing correctly. I followed the guides, and can not seem to get it working.

    First, I implemented a version using " https://www.drupal.org/project/views_bulk_operations ". There the action showed up, when configuring the user view, but nothing shows up, when I am extending "ActionBase".

  • 🇩🇪Germany Anybody Porta Westfalica

    @Grevil: Maybe you need to enable the core actions ui module? Or already enabled?
    Also perhaps check what other, available, actions do differently?

  • Status changed to Needs review over 1 year ago
  • 🇩🇪Germany Grevil

    Alright, all done! Works great! Tested both the functionality itself and the update hook!

    Note, that after executing "auto_username_user_insert" we need to flush all caches, to see the names changing. ALTHOUGH, this could also be partially related to the legacy code used inside "auto_username_user_insert". We should clear up some code in a follow up issue.

  • 🇩🇪Germany Grevil

    Created a follow-up issue for the legacy code and phpcs issues: 📌 Refactor legacy code and fix phpcs issues Active .

  • Status changed to RTBC over 1 year ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Note, that after executing "auto_username_user_insert" we need to flush all caches, to see the names changing. ALTHOUGH, this could also be partially related to the legacy code used inside "auto_username_user_insert". We should clear up some code in a follow up issue.

    Please create a separate issue for that, if not yet existing. You may remove the @todo OR add the link to that issue to make things clearer.

    RTBC anyway, despite the comment.

  • 🇩🇪Germany Grevil

    Adjusted code related to your comment and added code for removing the config on uninstallation.

  • Status changed to Needs review over 1 year ago
  • 🇩🇪Germany Grevil

    Alright, quite a few changes here, please rereview!

  • Status changed to RTBC over 1 year ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Perfect and ready to ship! :)

    @Maintainer: Please set the credits accordingly, seems it needs to be done manually here. Thanks!

  • Pipeline finished with Skipped
    7 months ago
    #225378
  • First commit to issue fork.
  • Status changed to Fixed 7 months ago
  • 🇳🇿New Zealand jlscott

    Thanks for the work to implement this additional function. Fixed and merged.

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

Production build 0.71.5 2024