mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-15476
Can now override the public key lifetime by specificying value for $CFG->mnetkeylifetime in config.php Merged from STABLE_19
This commit is contained in:
parent
90715d7a8d
commit
38612df899
@ -339,6 +339,12 @@ function mnet_get_keypair() {
|
||||
*/
|
||||
function mnet_generate_keypair($dn = null, $days=28) {
|
||||
global $CFG, $USER, $DB;
|
||||
|
||||
// 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.'/' , '/');
|
||||
|
Loading…
x
Reference in New Issue
Block a user