]> git.mjollnir.org Git - moodle.git/commitdiff
mnet: as reported by Eloy - login failures should be helpful to mnet users _only_...
authormartinlanghoff <martinlanghoff>
Tue, 23 Jan 2007 20:56:59 +0000 (20:56 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 23 Jan 2007 20:56:59 +0000 (20:56 +0000)
lang/en_utf8/mnet.php
login/index.php

index 37829e0b7e21cea896efb0e423964bd6bd4deab1..a25f9babea8a0fcc7073d538d39769de3d16d417 100644 (file)
@@ -226,4 +226,6 @@ $string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using M
                                     methods if the remote hosts allows them. Such enrolments are listed under
                                     <em>Other enrolled users</em>';
 $string['host'] = 'host';
+$string['loginlinkmnetuser'] = '<br/>If you are a Moodle Network remote user and can <a href=\"$a\">confirm your email address here</a>, you can be redirected to your login page.<br />';
+
 ?>
index 5118940794271d586785c5790a34077169b4ad6a..7399e8e71639b7e7cecf9bda8596b309f694d53c 100644 (file)
@@ -226,8 +226,9 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
             }
 
             // TODO: if the user failed to authenticate, check if the username corresponds to a remote mnet user
-            if ($users = get_records('user', 'username', $frm->username)) {
-                $errormsg .= "<br/>If you are a Moodle Network remote user and can <a href=\"mnet_email.php?u=$frm->username\">confirm your email address here</a>, you can be redirected to your login page.<br/>";
+            if ( $CFG->mnet_dispatcher_mode === 'strict'
+                 && is_enabled_auth('mnet')) {
+                $errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username");
             }
         }
     }