From f6b9882c42e94f2946dce880200bf5bef7dc4348 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 23 Jan 2007 20:56:59 +0000 Subject: [PATCH] mnet: as reported by Eloy - login failures should be helpful to mnet users _only_ if mnet and auth/mnet are running --- lang/en_utf8/mnet.php | 2 ++ login/index.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lang/en_utf8/mnet.php b/lang/en_utf8/mnet.php index 37829e0b7e..a25f9babea 100644 --- a/lang/en_utf8/mnet.php +++ b/lang/en_utf8/mnet.php @@ -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 Other enrolled users'; $string['host'] = 'host'; +$string['loginlinkmnetuser'] = '
If you are a Moodle Network remote user and can confirm your email address here, you can be redirected to your login page.
'; + ?> diff --git a/login/index.php b/login/index.php index 5118940794..7399e8e716 100644 --- a/login/index.php +++ b/login/index.php @@ -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 .= "
If you are a Moodle Network remote user and can username\">confirm your email address here, you can be redirected to your login page.
"; + if ( $CFG->mnet_dispatcher_mode === 'strict' + && is_enabled_auth('mnet')) { + $errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username"); } } } -- 2.39.5