]> git.mjollnir.org Git - moodle.git/commitdiff
mnet/forum MDL-18118 - email links were rewritten to use IDP when SITEID not 1
authorpoltawski <poltawski>
Mon, 2 Feb 2009 17:47:12 +0000 (17:47 +0000)
committerpoltawski <poltawski>
Mon, 2 Feb 2009 17:47:12 +0000 (17:47 +0000)
Switched check to use is_mnet_remote_user()

lib/moodlelib.php

index 86fcb05652686a9d484029db65192bb393404cf0..656fa5a29c3d0f0c4a57afa7d2bb0469a06e73dd 100644 (file)
@@ -4097,7 +4097,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
     // If the user is a remote mnet user, parse the email text for URL to the
     // wwwroot and modify the url to direct the user's browser to login at their
     // home site (identity provider - idp) before hitting the link itself
-    if ($user->mnethostid > 1) {
+    if (is_mnet_remote_user($user)) {
         require_once($CFG->dirroot.'/mnet/lib.php');
         // Form the request url to hit the idp's jump.php
         if (isset($mnetjumps[$user->mnethostid])) {