Skip to content

replace "request account deletion" with "disable"#612

Merged
simonLeary42 merged 9 commits into
mainfrom
disable-self
Feb 12, 2026
Merged

replace "request account deletion" with "disable"#612
simonLeary42 merged 9 commits into
mainfrom
disable-self

Conversation

@simonLeary42

@simonLeary42 simonLeary42 commented Feb 11, 2026

Copy link
Copy Markdown
Member
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the “request account deletion” feature with an explicit “disable account” flow across the web UI, backend libraries, SQL bootstrap data, and tests.

Changes:

  • Remove the account_deletion_requests table + all related PHP APIs, UI conditions, mail templates, and functional tests.
  • Add a “Danger Zone → Disable Account” action in panel/account.php that sets the user’s DISABLED flag (with server-side validation).
  • Update functional tests and fixtures to reflect the new disable behavior.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
webroot/panel/pi.php Fix form/div closing order in PI group “Danger Zone” section.
webroot/panel/groups.php Remove join-button disabling based on account deletion request status.
webroot/panel/account.php Replace account deletion request/cancel UI + handler with “disable account” flow; simplify PI request UI logic.
webroot/admin/user-mgmt.php Remove styling logic tied to account deletion requests.
tools/docker-dev/sql/bootstrap.sql Remove creation/index/auto-increment for account_deletion_requests.
tools/docker-dev/sql/bootstrap-users.sql Remove seed data for account_deletion_requests.
test/phpunit-bootstrap.php Remove helpers/assertions tied to account deletion requests; rename qualified-user helper.
test/functional/WorkerRemoveUsersFromGroupTest.php Update helper name usage after rename.
test/functional/UserDisableTest.php Add new functional coverage for disabling a user.
test/functional/PIRemoveUserTest.php Remove skipping logic tied to account deletion requests.
test/functional/PIBecomeRequestTest.php Remove test case tied to account deletion requests.
test/functional/AccountDeletionRequestTest.php Remove obsolete functional test suite.
resources/mail/account_deletion_request*_admin.php Remove obsolete admin mail templates for deletion requests.
resources/lib/UnityUser.php Remove account deletion request methods; rely on disable()/flags.
resources/lib/UnitySQL.php Remove account deletion request DB accessors/types/constants.
resources/lib/UnityGroup.php Remove guards blocking group actions due to deletion requests.
phpstan.neon Add ignore path for the new functional test file.
README.md Add migration note to drop account_deletion_requests table.
Comments suppressed due to low confidence (1)

webroot/panel/account.php:319

  • There is a large commented-out block related to the old account deletion flow left in the page. This dead/commented code makes future maintenance harder and can get out of sync with current behavior; consider removing it entirely or replacing it with a clear, active UI element behind a config/feature flag if it’s expected to return.
//     <p>
//         <strong>Request Account Deletion</strong>
//         <br>
//         If you wish for all non-essential personal information to be redacted,
//         send us an email at <a href='mailto:$support'>$support</a>.
//         This cannot be undone.
//     </p>
// ";
?>

<script>
    const url = '<?php echo getURL("panel/modal/new_key.php")?>';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread webroot/panel/account.php
Comment thread webroot/panel/account.php
Comment thread test/functional/UserDisableTest.php
Comment thread README.md
@simonLeary42 simonLeary42 marked this pull request as ready for review February 11, 2026 16:54
@simonLeary42 simonLeary42 merged commit eb4fbb2 into main Feb 12, 2026
3 checks passed
@simonLeary42 simonLeary42 deleted the disable-self branch February 12, 2026 15:40
@simonLeary42

Copy link
Copy Markdown
Member Author

Closes #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants