diff --git a/mnet/lib.php b/mnet/lib.php index d54358579fc..02d818640d9 100644 --- a/mnet/lib.php +++ b/mnet/lib.php @@ -307,6 +307,12 @@ function mnet_get_keypair() { */ function mnet_generate_keypair($dn = null, $days=28) { global $CFG, $USER; + + // check if lifetime has been overriden + if (!empty($CFG->mnetkeylifetime)) { + $days = $CFG->mnetkeylifetime; + } + $host = strtolower($CFG->wwwroot); $host = ereg_replace("^http(s)?://",'',$host); $break = strpos($host.'/' , '/');