mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-18 09:35:07 +00:00
6ab90aee79
StaffAccounts::delete() soft-deletes the row. What happens to the files and folders that account owns is a separate collaborator, and a caller that stops at the first one leaves them pointing at an account that no longer exists. The docblock mentioned "the content-reassignment step" in passing, as context for the return value, which is not the same as saying it is required. Worth stating outright because the mistake hides: validate() returns an empty array when the account owns nothing, so an account with no files deletes perfectly through delete() alone, and keeps doing so until somebody deletes a colleague who had actually done some work. Found while reviewing a design that was about to call delete() on its own.