Skip to content

Commit d2ea4b4

Browse files
authored
Merge pull request #545 from juancs/mnetuser
Improve user search in saml_login_complete method.
2 parents d6c641c + 2679eac commit d2ea4b4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

classes/auth.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ public function saml_login_complete($attributes) {
594594
$this->log(__FUNCTION__ . " to lowercase for $key => $uid");
595595
$uid = strtolower($uid);
596596
}
597-
if ($user = $DB->get_record('user', array( $this->config->mdlattr => $uid, 'deleted' => 0 ))) {
597+
if ($user = $DB->get_record('user', array(
598+
$this->config->mdlattr => $uid,
599+
'deleted' => 0,
600+
'mnethostid' => $CFG->mnet_localhost_id))) {
598601
continue;
599602
}
600603
}

0 commit comments

Comments
 (0)