Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21018

Mnet - link to mnet_email.php shows when it shouldn't

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8, 2.0
    • Component/s: Authentication, MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      when Mnet is enabled, if a user gets their password wrong on the login screen a link to Mnet_email is always shown even when SSO to Moodle isn't configured - if a site is only configured to allow their users to SSO to other sites - not the other way round, Moodle shouldn't show the link as it's useless - here's a patch that fixes it:

      — a/login/index.php
      +++ b/login/index.php
      @@ -238,7 +238,8 @@ httpsrequired();
      // TODO: if the user failed to authenticate, check if the username
      if ( !empty($CFG->mnet_dispatcher_mode)
      && $CFG->mnet_dispatcher_mode === 'strict'

      • && is_enabled_auth('mnet'))
        Unknown macro: {+ && is_enabled_auth('mnet') &&+ record_exists('mnet_host2service', 'publish', '1', 'serviceid', get_field('mnet_service', 'id', 'name', 'sso_sp')) ) { $errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username"); } }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Mar/10