Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4892

Certificate email functionality is no longer working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6, 2.6.1
    • Fix Version/s: None
    • Component/s: Module: Certificate
    • Labels:
      None
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      The certificate_email_others function in mod/certificate/lib.php is now broken
      Error displayed:
      Can not send email to null user

      line 5677 of \lib\moodlelib.php: call to debugging()
      line 392 of \mod\certificate\lib.php: call to email_to_user()
      line 658 of \mod\certificate\lib.php: call to certificate_email_others()
      line 88 of \mod\certificate\view.php: call to certificate_get_issue()

      This is because this function is somewhat abusing email_to user passing a record with just email set as the first parameter
      So it fails the first verification test line 5671 of lib/moodllib.php
      A possible solution could be to pass a more complete fake user with all needed values set (id and possibly others).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: