Commit a6c472fb authored by Kristina Hoeppner's avatar Kristina Hoeppner
Browse files

admin/cli: Delete accounts from specific institutions via CLI

New feature in Mahara 22.04: Accounts can now be
deleted not just for one but multiple institutions
at once via CLI (Bug #1957127).
parent 4ea39438
......@@ -54,13 +54,23 @@ If you want to delete accounts in bulk from the site without needing to go to th
* delete all accounts that have never been logged into, i.e. that were created manually, via CSV file, or an automated process;
* and / or delete all accounts that have not been logged in since a certain date;
* and / or delete only those accounts from a specific institution;
* :index:`and <single: New in Mahara 22.04; Delete accounts via CLI for specific institutions>` / or delete only those accounts from one or |new in Mahara 22.04| more specific institutions;
* |new in Mahara 22.04| delete accounts that don't belong to one or more specific institutions;
* delete accounts that are members of a specific group.
.. note::
When specifying institutions or groups, use their shortnames.
Execute the script with the following command. A dry run is made by default so that no data is deleted by accident.
**General dry run**:
``sudo -u www-data php htdocs/admin/cli/delete_inactive_users.php``
**See the help file**:
``sudo -u www-data php htdocs/admin/cli/delete_inactive_users.php -h``
.. index::
single: CLI; Index sites running Elasticsearch faster
......@@ -35,3 +35,8 @@ Résumé changes
|resume| Education and employment histories are now separate menu items to be able to deal better with dragging and dropping files.
You can attach files on an education or employment history item or an achievement either directly from your Mahara files area or by uploading a file from your device.
Delete accounts from specific institutions in bulk via CLI
|cli bulk delete| When you have a multi-tenanted site, you may wish to delete accounts based on certain criteria for more than one institution, but not all. This is now possible with the additions to the :ref:`CLI script that allows you to delete accounts in bulk <cli_userbulkdelete>`.
......@@ -549,3 +549,7 @@
.. |se download| raw:: html
<i class="fas fa-download fa-3x fa-pull-left new_icon" aria-hidden="true"></i>
.. |cli bulk delete| raw:: html
<i class="fas fa-users-slash fa-3x fa-pull-left new_icon" aria-hidden="true"></i>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment