Closed izendegi closed 5 years ago
Good find! This is a miss from when Moodle started requiring a login token. We provided that in normal login fields but I missed it for guest. If you add this in Fordson/templates/core/loginform.template around line 167 replacing similar code:
{{#canloginasguest}}
<div class="mt-2">
<p>{{#str}}someallowguest{{/str}}</p>
<form action="{{loginurl}}" method="post" id="guestlogin">
<input type="hidden" name="logintoken" value="{{logintoken}}">
<input type="hidden" name="username" value="guest" />
<input type="hidden" name="password" value="guest" />
<button class="btn btn-secondary btn-block" type="submit">{{#str}}loginguest{{/str}}</button>
</form>
</div>
{{/canloginasguest}}
<input type="hidden" name="logintoken" value="{{logintoken}}">
This line was missing.
Fixed in Version 1.2 for Moodle 3.6
Hi,
I've tested it and realized that same change should be also done around line 275.
Once done that it worked like a charm!
Hi,
I'm trying to enable guest access in a Moodle site following the docs 1 in a Moodle 3.6.1 with Fordson v3.6 release 1.1, but when I click on the 'Log in as guest' button it throws back a "Invalid login, please try again" message.
Changing the theme to Boost the button works as expected, so I guess it is something related to Fordson.
I've tried both the standard login and the custom Fordson login (showcustomlogin), and the error happens anyway.