Commit daf41aad authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1847345: Only mention we need to update simplesamlphp if installed"

parents 734491bc 2db711ad
......@@ -1484,11 +1484,12 @@ function auth_saml_openssl_x509_fingerprint($cert, $hash) {
$bin = base64_decode($cert);
return hash($hash, $bin);
}
$discofileexists = false;
if (file_exists(get_config('docroot') . 'auth/saml/extlib/simplesamlphp/lib/SimpleSAML/XHTML/IdPDisco.php')) {
require_once(get_config('docroot') . 'auth/saml/extlib/simplesamlphp/lib/SimpleSAML/XHTML/IdPDisco.php');
$discofileexists = true;
}
if (class_exists('SimpleSAML\XHTML\IdPDisco')) {
if ($discofileexists && class_exists('SimpleSAML\XHTML\IdPDisco')) {
class PluginAuthSaml_IdPDisco extends SimpleSAML\XHTML\IdPDisco
{
......@@ -1521,7 +1522,7 @@ if (class_exists('SimpleSAML\XHTML\IdPDisco')) {
}
}
}
else {
else if ($discofileexists) {
global $SESSION;
$SESSION->add_msg_once(get_string('errorupdatelib', 'auth.saml'), 'error', false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment