Moodle

Wrong (undefined) mnethostid prevents guest access sometimes...

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.1, 1.9
  • Fix Version/s: 1.8.2, 1.9
  • Component/s: Authentication
  • Labels:
    None
  • Environment:
    Any
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

There are two places where the "guest" user is created. Both admin/index.php and login/index.php are able to create such record in the user tables.

But when the user is created from login/index.php, the mnethostid isn't set, so defaults to 0, and with that value, it doesn't work anymore.

So plan is:

1) Create one new create_guest_user() function under moodlelib.php with correct settings.
2) Use it from admin/index.php and login/index.php
3) Provide a small upgrade to fix broken sites (I've seen some of them).

Ciao

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Done, both under 18_STABLE and HEAD.

Show
Eloy Lafuente (stronk7) added a comment - Done, both under 18_STABLE and HEAD.
Hide
Daniele Cordella added a comment -

Thank you Eloy and Andrea both.

Show
Daniele Cordella added a comment - Thank you Eloy and Andrea both.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: