Moodle
  1. Moodle
  2. MDL-25476

Email change notification not sent from support user

    Details

    • Testing Instructions:
      Hide

      Testing this is easiest if you have a course that you don't mind unenrolling everyone from. You'll need your admin and a student. You'll also need an email address you can access that isnt currently used on your test site.

      Go to /admin/settings.php?section=supportcontact and enter a name and email address for your support contact.
      The email address must be different from the default.

      Test email change notification:
      Check that the site setting "emailchangeconfirmation" is ticked
      Log in as a student
      Go to /user/edit.php?id=2 2 == the student's user id
      Change the user's email address. You should get a screen saying an email has been sent to the new address.
      Check the new email address. You should get an email about the email address change
      Check that the from name and email address match the ones you entered for the support contact

      Test that the fallback to admin works:
      Go back to the support contact page and clear the name and email address.
      As a student, go back to /user/edit.php?id=2 and change the email again.
      You should get a confirmation email, this time from admin.

      Re-add the support contact name and email address.

      Test failed login attempts notification:
      Set the site setting "notifyloginthreshold" to 1
      Set the site setting "notifyloginfailures" to admin
      Log out (or open a different browser), try to log in and get a users password wrong.
      Run cron.
      You should get an email about failed logins.
      Check that the from user and email address are the support contact.

      Test email_welcome_message():
      Check that the site setting "sendcoursewelcomemessage" is ticked
      Go to /admin/settings.php?section=manageenrols and enable self enrolment if it isnt
      Go into a course and go to course administration > Users > Enrolment methods.
      Enable self enrolment if if it isnt already.
      Go to course admininstration > users > Enrolled users and unenrol everyone
      As the student go to the course. There should be a "enrol me in this course" link in course administration.
      Enrol in the course.
      You should get a welcome email from the support contact.

      Show
      Testing this is easiest if you have a course that you don't mind unenrolling everyone from. You'll need your admin and a student. You'll also need an email address you can access that isnt currently used on your test site. Go to /admin/settings.php?section=supportcontact and enter a name and email address for your support contact. The email address must be different from the default. Test email change notification: Check that the site setting "emailchangeconfirmation" is ticked Log in as a student Go to /user/edit.php?id=2 2 == the student's user id Change the user's email address. You should get a screen saying an email has been sent to the new address. Check the new email address. You should get an email about the email address change Check that the from name and email address match the ones you entered for the support contact Test that the fallback to admin works: Go back to the support contact page and clear the name and email address. As a student, go back to /user/edit.php?id=2 and change the email again. You should get a confirmation email, this time from admin. Re-add the support contact name and email address. Test failed login attempts notification: Set the site setting "notifyloginthreshold" to 1 Set the site setting "notifyloginfailures" to admin Log out (or open a different browser), try to log in and get a users password wrong. Run cron. You should get an email about failed logins. Check that the from user and email address are the support contact. Test email_welcome_message(): Check that the site setting "sendcoursewelcomemessage" is ticked Go to /admin/settings.php?section=manageenrols and enable self enrolment if it isnt Go into a course and go to course administration > Users > Enrolment methods. Enable self enrolment if if it isnt already. Go to course admininstration > users > Enrolled users and unenrol everyone As the student go to the course. There should be a "enrol me in this course" link in course administration. Enrol in the course. You should get a welcome email from the support contact.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-25476_email_from_support
    • Rank:
      6543

      Description

      Email is sent using details from admin user instead of support settings

        Issue Links

          Activity

            People

            • Votes:
              20 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: