2

I had Moodle 3.11 i upgraded to 4.2 following the procedure from the docs. But after the upgrade, (i also moved it to a new VM) i notice that when ever I go to the platform, on the top right corner it shows that i'm connected anonnymously, next to the login button. I searched through the internet, the docs, checked my settings, but couldn't fix it .

I don't want anonymous acces, at all, i want that whenever anyone lands on my platform, that they directly face the login page, and have no access to anything at all unless they log in. I already disabled the anonymous connection button as many articles suggested but it doesn't solve the issue.

EDIT:

I've already done the following actions, but it did litterally nothing that can be seen. so the issue remains:

At "Security > Site security settings" /admin/settings.php?section=sitepolicies, enable the forcelogin option.

At "Security > Authentication > Manage" /admin/settings.php?section=manageauths (below the plugin list), set the guestloginbutton option to "Hide".

At "Users > Permissions > User policies" /admin/settings.php?section=userpolicies, disable the autologinguests option

1
  • If you're referring to "Login as Guest", have a look at this post. It contains some some advice that you haven't tried yet.
    – harrymc
    Dec 4, 2023 at 8:41

1 Answer 1

6
  1. At "Security > Site security settings" /admin/settings.php?section=sitepolicies, enable the forcelogin option.

  2. At "Security > Authentication > Manage" /admin/settings.php?section=manageauths (below the plugin list), set the guestloginbutton option to "Hide".

  3. At "Users > Permissions > User policies" /admin/settings.php?section=userpolicies, disable the autologinguests option and make sure the other settings are correct (most of them should be set to their default value).

After you are done with these settings you have to clear the browser's cache or try with another one to see the changes take effect.

Deploying Moodle from Git would allow easier and therefore more frequent upgrades, without having to jump many versions at a time.

7
  • Thanks for the tips, sorry i didn't clearly mentionned it in my post, but i already did all you said from 1 to 3. but the problem remains.
    – Xsmael
    Dec 4, 2023 at 8:22
  • 1
    This actually solved the problem, but i wasted so much time simply because the browser kept the "anonymous" session active, after trying with another browser or clearing the cache I could see the excpected behaviour taking place. This is crazy! I wasted so much time on a trivial thing. Thank you!
    – Xsmael
    Dec 4, 2023 at 14:17
  • 1
    @Xsmael it is encouraged to self-answer questions if you found a solution. Other users with the same problem may benefit from you answer mentioning browser cache and the guest session staying active even after changing the settings.
    – Falco
    Dec 4, 2023 at 14:19
  • 2
    You can still add your own solution as an additional answer and leave him the checkmark. - Comments can be deleted at any time - so relevant information should always be part of an answer.
    – Falco
    Dec 4, 2023 at 14:26
  • 1
    If the edits cover everything a separate answer is not needed. - If the user does not accept the edits you should write them up in a new answer.
    – Falco
    Dec 4, 2023 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .