Thanks for the patch Dongsheng.
I've detected some problems with it and I've committed a new version. It includes:
- Fixed logic: If the 'inserterrormail' config variable didn't exist, email wasn't ever sent!
- Renamed 'inserterrormail' to 'lastloginserterrormail'. More precise var name IMO.
- Minor formatting changes in the email (just added a couple of linefeeds here and there).
Sent to 19_STABLE and HEAD. Changing QA to Petr
About the direct use of the mail() function.... it's a good idea although perhaps it would be ok to use some semaphore (static variable) to avoid recursion and then use the standard email_to_user() Moodle alternative. It handles better a lot of things.
For your consideration. In its current state, it's enough good to build the WEEKLY properly. Ciao