Skip to content

Commit b6367a4

Browse files
committed
fix: improve wantsurl handling from loginpage list
1 parent 34c0b44 commit b6367a4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

login.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
if ($wantsurl !== '') {
3838
// This is later used in core_login_get_return_url().
3939
$SESSION->wantsurl = (new moodle_url($wantsurl))->out(false);
40+
} else {
41+
$wantsurl = optional_param('wants', '', PARAM_LOCALURL);
42+
if ($wantsurl !== '') {
43+
$SESSION->wantsurl = (new moodle_url($wantsurl))->out(false);
44+
}
4045
}
4146

4247
// Crap for hash anchor handling.

0 commit comments

Comments
 (0)