MDL-78120 login: handle empty wantsurl on login with alternateloginurl.

This commit is contained in:
Luca Bösch 2023-05-04 10:47:01 +02:00
parent 063ffc8073
commit b5a730cf9a

View File

@ -314,7 +314,7 @@ if (!empty($CFG->alternateloginurl)) {
$loginurlstr = $loginurl->out(false);
if (strpos($SESSION->wantsurl, $loginurlstr) === 0) {
if ($SESSION->wantsurl != '' && strpos($SESSION->wantsurl, $loginurlstr) === 0) {
// We do not want to return to alternate url.
$SESSION->wantsurl = null;
}