Switch User-Merge to a direct method on the User object #9
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.
(Copypasta'd the following from: #7 upon which this branch is based)
This is 'stacked' against the
refactor_logging_squashed_rebased
branch - and unifies the way we do User Merges whether they be from the CLI or from the GUI.Now,
$user->merge($bad_user)
is now a new method on User. I had to get a little clever with callbacks to be able to report the same information to the CLI tool that we had before, but now there's one base of code to do all user-merging.There was a subtle difference between how we did the CLI-merges versus the GUI merges - one would do a conventional
delete()
- causing a Deleteaction_log
entry, and one would do a simplesave()
withdeleted_at
set toNOW()
- which does not add anaction_log
. I've chosen to standardize on the "conventional delete" method, because I think the logs are clearer that way. Because of that, I needed to modify one test to reflect new, additionalaction_log
entry.