-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.4
-
None
-
MOODLE_401_STABLE
Hello,
I'm using CAS authentication and I defined the forgottenpasswordurl in /admin/settings.php?section=manageauths
When I receive a mail from send_login_notifications.php it's pointing to /user/preferences.php?userid=XX to change password instead of the forgottenpasswordurl i have set.
I think we should use this forgottenpasswordurl when it's defined by coding something like this :
$changepasswordlink = (new \moodle_url('/user/preferences.php', ['userid' => $USER->id]))->out(false); |
// Find a better final URL for changing password.
|
$userauth = get_auth_plugin($USER->auth);
|
if ($userauth->can_change_password()) { |
if ($changepwurl = $userauth->change_password_url()) |
{
|
$changepasswordlink = (string) $changepwurl;
|
}
|
else |
{
|
$changepasswordlink = (new \moodle_url('/login/change_password.php'))->out(false); |
}
|
}
|
else if (!empty($CFG->forgottenpasswordurl) && !empty(clean_param($CFG->forgottenpasswordurl, PARAM_URL))) |
{
|
$changepasswordlink = $CFG->forgottenpasswordurl;
|
}
|
- has a non-specific relationship to
-
MDL-74824 Custom change password URL is not included in login notification messages
-
- Closed
-