mnet: as reported by Eloy - login failures should be helpful to mnet users _only_ if mnet and auth/mnet are running

This commit is contained in:
martinlanghoff
2007-01-23 20:56:59 +00:00
parent 6e55c60a94
commit f6b9882c42
2 changed files with 5 additions and 2 deletions
+2
View 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 />';
?>
+3 -2
View 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");
}
}
}