attempt to fix mnet jumping issue when already logged in as guest
authorPetr Skoda <skodak@moodle.org>
Thu, 11 Nov 2010 09:39:41 +0000 (09:39 +0000)
committerPetr Skoda <skodak@moodle.org>
Thu, 11 Nov 2010 09:39:41 +0000 (09:39 +0000)
auth/mnet/jump.php

index b729a7b..d55346c 100644 (file)
@@ -26,7 +26,10 @@ if ($hostwwwroot !== '') $url->param('hostwwwroot', $hostwwwroot);
 if ($wantsurl !== '') $url->param('wantsurl', $wantsurl);
 $PAGE->set_url($url);
 
-require_login(SITEID,false);
+if (!isloggedin() or isguestuser()) {
+    $SESSION->wantsurl = $PAGE->url->out(false);
+    redirect(get_login_url());
+}
 
 if (!is_enabled_auth('mnet')) {
     print_error('mnetdisable');