File tree 1 file changed +0
-39
lines changed
1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change 22
22
* @copyright Catalyst IT
23
23
*/
24
24
25
- /**
26
- * Check if we have the saml=on param set. If so, disable guest access and force the user to log in with saml.
27
- *
28
- * This is an implementation of a legacy callback that will only be called in older Moodle versions.
29
- * It will not be called in Moodle 4.5+ that contain the hook core\hook\after_config,
30
- * instead, the callback auth_saml2\local\hooks\after_config::callback will be executed.
31
- *
32
- * @since Moodle 3.8
33
- * @return void
34
- */
35
- function auth_saml2_after_config () {
36
- global $ CFG ;
37
- try {
38
- $ saml = optional_param ('saml ' , null , PARAM_BOOL );
39
- if ($ saml == 1 ) {
40
- if (isguestuser ()) {
41
- // We want to force users to log in with a real account, so log guest users out.
42
- require_logout ();
43
- }
44
- // We have the saml=on param set. Disable guest access (in memory -
45
- // not saved in database) to force the login with saml for this request.
46
- unset($ CFG ->autologinguests );
47
- }
48
- } catch (\Exception $ exception ) {
49
- debugging ('auth_saml2_after_config error ' , DEBUG_DEVELOPER , $ exception ->getTrace ());
50
- }
51
- }
52
-
53
- /**
54
- * Callback immediately after require_login succeeds.
55
- *
56
- * This is an implementation of a legacy callback that will only be called in older Moodle versions.
57
- * It will not be called in Moodle 4.4+ that contain the hook core\hook\output\before_http_headers,
58
- * instead, the callback auth_saml2\local\hooks\output\before_http_headers::callback will be executed.
59
- */
60
- function auth_saml2_after_require_login () {
61
- \auth_saml2 \auto_login::process ();
62
- }
63
-
64
25
/**
65
26
* Callback before HTTP headers are sent.
66
27
*
You can’t perform that action at this time.
0 commit comments