Use 'cron_setup_user' when sending emails (#414)

This commit is contained in:
Mark Nelson 2021-06-13 14:04:18 +08:00
parent 7a45c41cd9
commit 6ce7f1fd45
2 changed files with 4 additions and 0 deletions

View file

@ -16,6 +16,7 @@ Note - All hash comments refer to the issue number. Eg. #169 refers to https://g
- Users being able to view the certificate before the required time set (#403).
- Fixed the issue with displaying PDF when debugging is ON (#420).
- Using incorrect context when sending emails (#402).
- Use `cron_setup_user` when sending emails (#414).
## [3.8.5] - 2020-11-26

View file

@ -179,6 +179,9 @@ class email_certificate_task extends \core\task\scheduled_task {
// Now, email the people we need to.
foreach ($issuedusers as $user) {
// Set up the user.
cron_setup_user($user);
$userfullname = fullname($user);
$info->userfullname = $userfullname;