[5.4] Update notification code improvements#46071
Conversation
|
Just to make sure I'm testing it correctly. I have created a few users:
All users have the “Receive system emails” checkbox selected. Scenario 1 Scenario 2 Scenario 3 Scenario 4 |
|
@tecpromotion If scenario 4 is the same without and with this PR, then it's a separate issue. Of course it would be nice if it could be fixed by this PR here, too, but possibly @SniperSister can have a look. |
Same with and without PR for Scenario 4. |
|
I have tested this item ✅ successfully on 01ad884 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46071. |
|
@tecpromotion It's worth a question if scenario 4 is really valid. When the server is not reachable from the internet, the notification will never be triggered in the regular way. |
|
I have tested this item ✅ successfully on 01ad884 Basically I've verified that #46050 still works with this PR here applied. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46071. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46071. |
From my external perspective, scenario 4 is not a use case in practice. I guess you only receive emails through the hack. I believe that if Automatic Updates are disabled, users should not receive emails. It would be great if @joomdonation or @SniperSister could give a definitive answer. |
|
Without enabled automated updates, users shall and will not get emails. |
|
Final test before merge with manual PRs full package installation in public available site:
Test cases:
|
|
Thank you @joomdonation for your contribution. Thank you @SniperSister for your support. Thank you @tecpromotion and @richard67 for testing. |
* Improve sends update notification code
Pull Request for Issue # .
Summary of Changes
This PR makes several improvements to the code which handles sending update notification:
UsersModelto allow us to get only users which have Receive System Email parameter set to Yes or No (the current code has to get all users, and filter out the un-wanted users by PHP, an unnecessary extra process).getEmailReceiversmethod, uses filter.groups state from UsersModel to get users from all groups at one instead having to loop over every user group like in current code.Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
[] Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
[] Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed