user_bulk_delete
The User Bulk Delete module for Drupal 10 provides a simple and efficient way to manage and delete inactive user accounts based on their login activity. Specifically, the module allows site administrators to:
Track User Login Counts: The module introduces a custom field named login_count to the user entity, which keeps track of how many times a user has logged in. This field is automatically created during the module installation.
List Users with Low Activity: Through a dedicated interface, administrators can generate a list of users who have logged in fewer than 5 times. This list is displayed in a table format, showing each user's ID, username, and login count.
Selective Bulk Deletion: The module provides an option to selectively delete users directly from the list of low-activity accounts. Administrators can review the list and confirm deletion, ensuring that only the intended users are removed. Additionally, the module ensures that certain critical users, such as the user with ID 1 (typically the first and main administrator), are excluded from deletion.
Field Management: The custom login_count field is automatically created during the module's installation. Upon uninstalling the module, this field is removed, ensuring that the site remains clean and free of unused configurations.
Key Features:
Non-Editable Field: The login_count field is set to be non-editable by users, preventing any manual tampering with the login count.
User-Friendly Interface: The module integrates seamlessly into the Drupal administrative interface, offering a straightforward and user-friendly way to manage user accounts.
Flexibility: While the module is designed to target users with low login activity, it can be customized or extended to include additional criteria or functionalities as needed.
Post-Installation
After installing the User Bulk Delete module, you should enable and configure the display of the login_count field through the Drupal administrative interface. Here’s how you can do it:
Navigate to the Form Display Configuration:
Go to /admin/config/people/accounts/form-display in your Drupal site.
Configure the Field Display:
You’ll find a form display settings page for user accounts. Look for the login_count field in the list of available fields.
Set the visibility and position of the login_count field as needed. You can adjust its placement and choose whether it should be visible on the user edit form or not.
Save the Configuration:
Once you’ve configured the display settings to your satisfaction, make sure to save the changes.