Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18440

email_to_user() shows notices when sending email to "incomplete" $user objects

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5
    • Component/s: Libraries
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The email_to_user() function is supposed to work with "fake" (not belonging to DB) $user objects . This way, it's enough to have:

      $user->email= 'xx@domain.com'

      and mail will be sent to that address, no matter of the rest of the missing bits in the $user object.

      But right now, two notices about undefined $user->id are present. One in the set_send_count() function and another in the over_bounce_threshold() function.

      Going to check for $user->id existence in both functions to prevent those notices.

        Attachments

          Activity

            People

            • Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Tester:
              Andrew Davis
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09