Skip to content
Permalink
Browse files

mnet/login: MDL-21018 - be a bit more picky about when to show the li…

…nk to mnet_email.php
  • Loading branch information...
Penny Leach
Penny Leach committed Jan 11, 2010
1 parent f3a1b0c commit decbf994c0e9ef7d2fd756ae944fcb849d432383
Showing with 8 additions and 2 deletions.
  1. +8 −2 login/index.php
@@ -235,10 +235,16 @@
$errorcode = 3;
}
// TODO: if the user failed to authenticate, check if the username corresponds to a remote mnet user
if ( !empty($CFG->mnet_dispatcher_mode)
&& $CFG->mnet_dispatcher_mode === 'strict'
&& is_enabled_auth('mnet')) {
&& is_enabled_auth('mnet')
&& record_exists_sql("SELECT h.id FROM {$CFG->prefix}mnet_host h
INNER JOIN {$CFG->prefix}mnet_host2service m ON h.id=m.hostid
INNER JOIN {$CFG->prefix}mnet_service s ON s.id=m.serviceid
WHERE s.name='sso_sp' AND h.deleted=0 AND m.publish = 1")
&& record_exists_select('user', "username = '{$frm->username}' AND mnethostid != {$CFG->mnet_localhost_id}")
) {
$errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username");
}
}

0 comments on commit decbf99

Please sign in to comment.
You can’t perform that action at this time.