mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-60038-master' of https://github.com/aneno-m-e/moodle
This commit is contained in:
commit
decf1ba332
1 changed files with 2 additions and 1 deletions
|
@ -2899,7 +2899,8 @@ function require_login($courseorid = null, $autologinguest = true, $cm = null, $
|
|||
|
||||
// Check that the user has agreed to a site policy if there is one - do not test in case of admins.
|
||||
// Do not test if the script explicitly asked for skipping the site policies check.
|
||||
if (!$USER->policyagreed && !is_siteadmin() && !NO_SITEPOLICY_CHECK) {
|
||||
// Or if the user auth type is webservice.
|
||||
if (!$USER->policyagreed && !is_siteadmin() && !NO_SITEPOLICY_CHECK && $USER->auth !== 'webservice') {
|
||||
$manager = new \core_privacy\local\sitepolicy\manager();
|
||||
if ($policyurl = $manager->get_redirect_url(isguestuser())) {
|
||||
if ($preventredirect) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue