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

Pass all user data to email strings.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.5.9, 3.6.7, 3.7.3
    • Email
    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-67267-master_pass_all_user_data_to_email_string
    • Hide

      reset_password_and_mail

      No change was made for this function since the function is not used anywhere.

      setnew_password_and_mail

      Test steps:

      1. Go to Site Administration

      2. Click on Users tab

      3. Click on Add a new user

      4. User should have username, first name, surname, email address. Please make sure Generate password and notify user checkbox under Choose an authentication method is ticked.

      5. Click on Create user button.

      Expected result: Email sent out to the newly added user should contain the same message as before.

      send_confirmation_email

      Test steps:

      1. Go to Site Administration

      2. Click on Users tab

      3. Click on Browse list of users

      4. Click on Resend email button next to a user’s account.

      Expected result: Email sent out to the specified user should contain the same message as before.

      send_password_change_confirmation_email

      Test steps:

      1. Make sure you are not login

      2. Click on Log in link on the top right

      3. Click on Click on Forgotten your username or password link

      4. Fill up either username or email address text box

      5. Click on Search button under Search by username if username is filled up

      6. Click on Search button under Search by email address if email address is filled up

      Expected result: Emails sent out to the user who requested to recovery password should contain the same message as before.

      send_password_change_info

      Test steps:

      1. Make sure a user’s Change own password capability is disabled.

      2. To achieve the above: go to Site administration

      3. Click on Users tab

      4. Click on Define roles under Permissions category

      5. Click on Authenticated user link

      6. Click on Edit button

      7. Make sure the checkbox is not ticked for Change own password.

      8. Logout the system.

      9. Click on Log in link on the top right.

      10. Click on Click on Forgotten your username or password link.

      11. Fill up either username or email address text box.

      12. Click on Search button under Search by username if username is filled up.

      13. Click on Search button under Search by email address if email address is filled up.

      Expected result: Emails sent out to the user who requested to recovery password should contain the same message as before. In this case, the email will inform the user that it is not possible to reset password this way.

      Show
      reset_password_and_mail No change was made for this function since the function is not used anywhere. setnew_password_and_mail Test steps: 1. Go to Site Administration 2. Click on Users tab 3. Click on Add a new user 4. User should have username, first name, surname, email address. Please make sure Generate password and notify user checkbox under Choose an authentication method is ticked. 5. Click on Create user button. Expected result: Email sent out to the newly added user should contain the same message as before. send_confirmation_email Test steps: 1. Go to Site Administration 2. Click on Users tab 3. Click on Browse list of users 4. Click on Resend email button next to a user’s account. Expected result: Email sent out to the specified user should contain the same message as before. send_password_change_confirmation_email Test steps: 1. Make sure you are not login 2. Click on Log in link on the top right 3. Click on Click on Forgotten your username or password link 4. Fill up either username or email address text box 5. Click on Search button under Search by username if username is filled up 6. Click on Search button under Search by email address if email address is filled up Expected result: Emails sent out to the user who requested to recovery password should contain the same message as before. send_password_change_info Test steps: 1. Make sure a user’s Change own password capability is disabled. 2. To achieve the above: go to Site administration 3. Click on Users tab 4. Click on Define roles under Permissions category 5. Click on Authenticated user link 6. Click on Edit button 7. Make sure the checkbox is not ticked for Change own password. 8. Logout the system. 9. Click on Log in link on the top right. 10. Click on Click on Forgotten your username or password link. 11. Fill up either username or email address text box. 12. Click on Search button under Search by username if username is filled up. 13. Click on Search button under Search by email address if email address is filled up. Expected result: Emails sent out to the user who requested to recovery password should contain the same message as before. In this case, the email will inform the user that it is not possible to reset password this way.

      At the moment, when creating the email content for some email types such as reset password, some user data is sent (firstname, username etc).

      When overriding these strings to create a custom email message, we are limited by what data is passed by default for the email content.

      I propose that the entire user object is passed to the string, in order to add flexibility when creating the lang string.

      Example- Reset password email: https://github.com/moodle/moodle/blob/master/lib/moodlelib.php#L6388

      I would appreciate help compiling a list of which emails could benefit from this. I found these in the same neighbourhood in moodlelib.php.

      Emails to improve:
      reset_password_and_mail
      setnew_password_and_mail
      send_confirmation_email
      send_password_change_confirmation_email
      send_password_change_info

            andrewmadden Andrew Madden
            andrewmadden Andrew Madden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.