replace "request account deletion" with "disable"#612
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_requeststable + all related PHP APIs, UI conditions, mail templates, and functional tests. - Add a “Danger Zone → Disable Account” action in
panel/account.phpthat sets the user’sDISABLEDflag (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.
bryank-cs
approved these changes
Feb 11, 2026
Member
Author
|
Closes #217 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.