diff --git a/mnet/environment.php b/mnet/environment.php index 982579b87f7..8734cc73faf 100644 --- a/mnet/environment.php +++ b/mnet/environment.php @@ -148,9 +148,11 @@ class mnet_environment { } function replace_keys() { + global $CFG; $this->keypair = array(); $this->keypair = mnet_generate_keypair(); $this->public_key = $this->keypair['certificate']; + $this->wwwroot = $CFG->wwwroot; $details = openssl_x509_parse($this->public_key); $this->public_key_expires = $details['validTo_time_t'];