Our database servers were busy with the following query:
SELECT ?
FROM mdl_user
WHERE lower(email) collate utf?mb?_bin = lower(?)
AND mnethostid = ?
AND deleted = ?
AND username <> ? limit ?, ?
We wondered why this query is called at every login although CFG->allowaccountssameemail =1 is set.
Starting at auth/saml2/classes/auth.php function saml_login_complete() we ended up at function update_user_record_from_attribute_map() and we found that the setting was ignored. empty($CFG->allowaccountssameemail) was always true because global $CFG definiton was missing.
Our database servers were busy with the following query:
We wondered why this query is called at every login although CFG->allowaccountssameemail =1 is set.
Starting at auth/saml2/classes/auth.php function saml_login_complete() we ended up at function update_user_record_from_attribute_map() and we found that the setting was ignored.
empty($CFG->allowaccountssameemail)
was always true because global $CFG definiton was missing.