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

Support for external forgot password url

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE

      Description

      I posted this in the authentication forum but didn't get an answer http://moodle.org/mod/forum/discuss.php?d=69353#p311274 . I think its a bug, so submitting here for confirmation.

      My custom auth plugin has fields in it for a custom url to direct people to if they'd forgotten their password, and some help text to display at the same time. Up until recently, If the user called login/forgot_password.php they were redirected appropriately.

      I think with the quickforms upgrade in 1.8 this might have been lost. It no longer appears to check my auth plug-in to see if there's anything different it should do, so instead my users get a "you can't change your password" email message.

      I think, looking back in my cvs history, the relevant code might be something like this, it goes in the display section...

      if (!empty($userauth->config->changepasswordhelp)) {
      $strextmessage = $userauth->config->changepasswordhelp .'<br /><br />';
      }
      // if url defined then add that to the message (with a standard message)
      if (method_exists($userauth, 'change_password_url') and $userauth->change_password_url($user)) {
      $strextmessage .= '<br /><br /><a href="' . $userauth->change_password_url($user) . '">' . $userauth->change_password_url($user) . '</a>';
      }

      print_header($strforgotten, $strforgotten,
      "<a href=\"{$CFG->wwwroot}/login/index.php\">{$strlogin}</a>->{$strforgotten}", 'id_email');
      print_box($strextmessage, 'generalbox boxwidthnormal boxaligncenter');
      print_footer();

      To get this in the current form will need a bit of jigging about though, which I why I'm not offering a complete patch! Am I mad? Is there a different way I should be doing this redirect now?

      Jenny

        Attachments

          Activity

            People

            Assignee:
            moodle.com moodle.com
            Reporter:
            jenny-gray Jenny Gray
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: