[5.4] Improve defining email recipients for update notification #45960
+77
−92
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.
Follow-up for PR #45721
Summary of Changes
Until now, recipients of update notifications are defined as a comma separated list of email addresses.
This means: First find the email-addresses of super users, then maintain the list when super users leave or are added or when they change emailaddress.
This PR works like in AutoUpdate notification: #45721
All Super Users get the update notification. Additionally other user groups can be added. Recipients must be active and have the sendEmail Option allowed.
The Updatescript will remove the old email option from parameters in the table. If there were old entries, they will be deleted. These entries were a subset of super users, so there is no break.
Testing Instructions
Run the update script. The mysql script is tested, the postgresql script is generated by AI and needs a tester with these skills.
Make different users, different user groups, they can be empty, have super users not, have sendEmail activated or not and can be blocked or not.
Go to scheduled tasks and open the Update Notification Plugin. Check if user Groups can be added.
Testing if the email addresses now are correct is tricky.
Actual result BEFORE applying this Pull Request
Comma separated list of super users or the super user (id = 8) per default

Expected result AFTER applying this Pull Request
It is possible to select user groups from a list. Super Users are added per default and must notr be selected.

Link to documentations
Please select:
Documentation link for docs.joomla.org: [(https://docs.joomla.org/J3.x:Plugin_Joomla_Update_Notification#Super_User_Email]
No documentation changes for manual.joomla.org needed