Allow Updating Existing Users

Created on 9 March 2021, about 4 years ago
Updated 13 November 2024, 5 months ago

Problem/Motivation

I have a need to run a bulk import where some users already exists and others don't. For the ones that exist, I'd like to update their information with what's in the spreadsheet, especially their roles.

Proposed resolution

I've posted a patch to get the ball rolling, and to see if this feature is OK to flesh out a little more. Below are the remaining tasks that could make this update more valuable.

Remaining tasks

  • Add a configuration option to allow/prevent existing users from being updated.
  • Combine the createUser() and updateUser() functions since there's a lot of overlap. A flag could be passed to the function to say if it's a "create" or "update".
  • Other requested updates, likely for other threads:
    • Incorporate /admin/config/people/bulk_user_register form into the /admin/people/bulk_user_register form
    • Add the /admin/people/bulk_user_register form to the administrative menu
    • There are some other updates that could be made for Drupal 9 compatibility (ex. user_load_by_mail)
    • Add a configuration option to explicitly allow/prevent user emails from sending after an account is created
    • Add a configuration option to customize the delimiter
    • Move the array of extra fields to include in the CSV out of hook_bulk_user_registration_extra_fields() and over to the configuration UI page

User interface changes

Feature request
Status

Active

Component

Code

Created by

🇺🇸United States ryankavalsky

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.

Production build 0.71.5 2024