-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
4.0.5
-
None
-
MOODLE_400_STABLE
Change password link is not replaced correctly in language string newloginnotificationbodyfull in case, when forgottenpasswordurl is set in site.
Proposed fix for this:
diff --git a/lib/classes/task/send_login_notifications.php b/lib/classes/task/send_login_notifications.php
index e32cf28d06a..d6c2c765a49 100644
--- a/lib/classes/task/send_login_notifications.php
+++ b/lib/classes/task/send_login_notifications.php
@@ -61,7 +61,11 @@ class send_login_notifications extends adhoc_task {
$userauth = get_auth_plugin($USER->auth);
if ($userauth->can_change_password()) {
if ($changepwurl = $userauth->change_password_url()) {
- $changepasswordlink = $changepwurl;
+ if ($changepwurl instanceof \moodle_url) {
+ $changepasswordlink = $changepwurl->out(false);
+ } else {
+ $changepasswordlink = (string)$changepwurl;
+ }
} else {
$changepasswordlink = (new \moodle_url('/login/change_password.php'))->out(false);
}
- duplicates
-
MDL-74824 Custom change password URL is not included in login notification messages
-
- Closed
-