Guest's don't have to fill in required custom profile field during the registration process.

Guest's don't have to fill in required custom profile field during the registration process.

by Marek Kancelarek -
Number of replies: 3
Hello,

I have noticed that people logged in as guests do not have to fill in profile fields I have manually added and marked as required.

Here is a point-by-point overview:

0. Moodle 2.8.2
1. E-mail based self-registration is enabled.
2. Guest access is enabled. Both log-in as quest button and automatically for every person visiting the website - so as to allow access to ToS and course overview pages.
3. There is a custom 'register on the website' link added to the main menu. It points to /login/signup.php
4. There are a bunch of custom user profile fields added. All are set as required, to display on the signup page and as visible to user.

Now the scenario:
1. A user visits the website.
2. A user click on register (signup).
3. A user is directed to the registration form. A user fills the form while auto-logged as guest.
4. The required fields are not marked as required. The red asterisk is not displayed.
5. A user is able to proceed with the registration without filling in all the necessary information.

Is there a solution for the problem described above?


Just checked. It turns out the the same is possible for any logged in user. Custom profile fields marked as required can be omitted if some other user is already logged when the registration form is accessed.


A potential solution I just thought about would be a logout and signup link or automatically logging out everyone who accesses the signup site if something like that is possible.

Average of ratings: -
In reply to Marek Kancelarek

Re: Guest's don't have to fill in required custom profile field during the registration process.

by Jackie Toth -

Happy Friday Marek,

This is a know bug.  https://tracker.moodle.org/browse/MDL-42138.

Cheers,

Jackie

Average of ratings: Useful (1)
In reply to Jackie Toth

Re: Guest's don't have to fill in required custom profile field during the registration process.

by Marek Kancelarek -

Thank you very much for pointing me out to this bug. I will try implement the patch mentioned there on my website. I have implemented Marina Glancy's solution and it works like a charm for guests.

Unfortunately it does not work for logged users. If someone with an existing account accesses the registration form they are still able to skip the fields marked as required. I do not however expect many such users .

In reply to Marek Kancelarek

Re: Guest's don't have to fill in required custom profile field during the registration process.

by Marek Kancelarek -

I have created MDL-49003 for the logged in users being able to skip custom required fields issue.