Moodle
  1. Moodle
  2. MDL-30607

Once you override your email address in your messaging preferences you cannot un-override it

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2, 2.3
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Messages
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Go to your messaging preferences and add an email address that is different from the default one. Save.

      Clear the email box and save. Check that the box is empty when the page reloads.

      Show
      Go to your messaging preferences and add an email address that is different from the default one. Save. Clear the email box and save. Check that the box is empty when the page reloads.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-30607_override_email
    • Rank:
      33408

      Description

      If you try to clear the email address box on your messaging preferences and save the previous value reappears.

      This was introduced by MDL-27171. Specifically changing this...

      if (isset($form->email_email)) {
          $preferences['message_processor_email_email'] = $form->email_email;
      

      to this...

      if (isset($form->email_email) && !empty($form->email_email)) {
          $preferences['message_processor_email_email'] = $form->email_email;
      

      Either reverting that change or making that check a bit smarter should do the trick.

        Issue Links

          Activity

          Show
          Andrew Davis added a comment - The change the introduced the problem can be viewed at http://fisheye.moodle.org/viewrep/Moodle/message/output/email/message_output_email.php?r1=d3a8184239d351db05e07c22c237698c34308b04&r2=f8351d09272a12121c6f2888642645d150b28508
          Hide
          Andrew Davis added a comment - - edited

          Adding master branch info.

          This needs to go into master, 2.2 and 2.1. Doesnt have to go into 2.0 (Im just writing this to remind myself when I come back to create the various branches)

          Show
          Andrew Davis added a comment - - edited Adding master branch info. This needs to go into master, 2.2 and 2.1. Doesnt have to go into 2.0 (Im just writing this to remind myself when I come back to create the various branches)
          Hide
          Sam Hemelryk added a comment -

          Changes look good thanks Andrew

          Show
          Sam Hemelryk added a comment - Changes look good thanks Andrew
          Hide
          Aparup Banerjee added a comment -

          Thank you, this has been integrated.

          Show
          Aparup Banerjee added a comment - Thank you, this has been integrated.
          Hide
          Ankit Agarwal added a comment - - edited

          Hi,
          The fix works as expected but I found another related issue.
          There is no validation of email format here.
          I can simply enter "whatever" and save.
          Will create an issue for that.

          Edit: Found an existing issue for that MDL-13572
          Thanks

          Show
          Ankit Agarwal added a comment - - edited Hi, The fix works as expected but I found another related issue. There is no validation of email format here. I can simply enter "whatever" and save. Will create an issue for that. Edit: Found an existing issue for that MDL-13572 Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yes, you did it!

          Now your code is part of the best weeklies released ever, many thanks!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yes, you did it! Now your code is part of the best weeklies released ever, many thanks! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: