-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.12, 3.10.9, 3.11.5, 4.0, 4.1
The email bounce quota handling is essentially broken for all Moodle instances that don't employ manual user profile creation/updating.
Note: Duplicate of MDL-16891, to mark the source commit's 17th birthday tomorrow. 🥳
Commit bb64b51aa335 introduced user-specific handling of email bounces.
However, the two base values that are necessary for bounce quota calculations (email_send_count and email_bounce_count) are only gathered when a user account's email address has been modified manually at least once before.
Technical details:
Both set_send_count() and set_bounce_count() only operate on existing values in mdl_user_preferences (=probably unintended/faulty behavior). But creation of these values only occurs when they get reset - which happens in useredit_update_bounces() right now. This function however is only called in user/edit(advanced).php, which is probably another bug: it means that the address-specific bounce counters won't get reset when changing an email address via external data source (auth plugin login or sync).