FOUR-32114 / FOUR-32202: Correct user signals on restore and delete#8893
Open
eiresendez wants to merge 2 commits into
Open
FOUR-32114 / FOUR-32202: Correct user signals on restore and delete#8893eiresendez wants to merge 2 commits into
eiresendez wants to merge 2 commits into
Conversation
CarliPinell
approved these changes
Jul 2, 2026
CarliPinell
left a comment
Contributor
There was a problem hiding this comment.
Approved.
No observations were found.
|
QA server K8S was successfully deployed https://ci-e1313a8493.engk8s.processmaker.net |
Contributor
Author
|
FOUR-32202 is now included in this PR as a separate commit. The delete path persists |
|
|
QA server K8S was successfully deployed https://ci-e1313a8493.engk8s.processmaker.net |
mcraeteisha
approved these changes
Jul 15, 2026
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.





Issue & Reproduction Steps
User lifecycle actions could emit redundant user signals when
package-advanced-user-manageris installed:user_updateevents because the model callback saved once and Laravel SoftDeletes saved again.user_updatebeforeuser_deletebecause thedeletingcallback savedstatus = INACTIVEwith normal model events.To reproduce the delete issue:
user-signal.updateanduser-signal.delete.user_updateanduser_delete.DELETE /api/1.0/users/{user}.user_delete.Solution
save()fromUser::restoringand let Laravel persiststatus = ACTIVEwithdeleted_at = nullin its restore save.User::deletingtosaveQuietly(), preservingstatus = INACTIVEwithout emitting anupdatedevent before deletion.deletedevent sopackage-advanced-user-managerstill emitsuser_delete.No routes, payloads, configuration, database schema, or public APIs were changed.
How to Test
Automated checks run:
php -l ProcessMaker/Models/User.phpphp -l tests/Feature/Api/UsersTest.phpvendor/bin/phpunit tests/Feature/Api/UsersTest.php --filter=testRestoreSoftDeletedUserDispatchesOneUpdatedEventvendor/bin/phpunit tests/Feature/Api/UsersTest.php --filter=testDeleteUserDispatchesDeletedWithoutUpdatedEventvendor/bin/phpunit tests/Feature/Api/UsersTest.phpgit diff --checkResult: 29 tests passed with 370 assertions in
UsersTest.php.Manual QA:
user_update.user_updateand exactly oneuser_delete.status = INACTIVEand is removed from its groups.Related Tickets & Packages
package-advanced-user-manager; no package changes are required.package-auth.ci:deploy
.