Changed invited page to force guest login (even when disabled) instead of no login at all
This commit is contained in:
parent
8299d4c9d1
commit
073e8e0b28
|
@ -23,6 +23,12 @@
|
|||
|
||||
require_once("../../config.php");
|
||||
// Since this page is externally accessed and validated in a different way, no login is needed.
|
||||
// In fact, we need to override the behaviour of require_login to force "guest access" here, even if the configuration says differently
|
||||
$autologin = $CFG->autologinguests; // Store current guest autologin configuration value.
|
||||
$CFG->autologinguests = 1; // Override guest autologin configuration value.
|
||||
require_login(null,true); // Trigger require_login to make sure we have guest access
|
||||
$CFG->autologinguests = $autologin; // Restore old guest autologin configuration value
|
||||
unset($autologin);
|
||||
|
||||
|
||||
$systemcontext = context_system::instance();
|
||||
|
|
Loading…
Reference in New Issue
Block a user