LDAP server (Sync Plus) - Required fields for entry

LDAP server (Sync Plus) - Required fields for entry

by Дмитрий Курбатов -
Number of replies: 4

Good afternoon!

I have Moodle 3.9.

Is there a solution or workaround that would allow creating new user accounts without specifying Name, Surname and E-mail, if the LDAP server authentication method (Sync Plus) is specified?

From the description for this plugin, it follows that “The only thing you have to specify correctly is the username (which corresponds to the username in LDAP). All other details like first name or email address can be filled with placeholder content. After you click the "Create user" button, Moodle pulls the other user's details from LDAP and creates the user account correctly with the details from LDAP. "

How to disable even the need for "placeholders" at all, i.e. make the above fields optional if the authentication method is LDAP server (Sync Plus)?

Thanks in advance.

Average of ratings: -
In reply to Дмитрий Курбатов

Re: LDAP server (Sync Plus) - Required fields for entry

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Do you don't want these fields in Moodle at all? How will they get contacted without an email?
In reply to Emma Richardson

Re: LDAP server (Sync Plus) - Required fields for entry

by Дмитрий Курбатов -
Dear Emma!

The point is that if the data source for these fields is the LDAP-catalog, then there is no need for them (fields) to be required for input. They should be at least optional, or disabled (unavailable) at all.

Filling in these fields with so-called «placeholders» in order to bypass the integrity constraint (the data is not saved if you leave the fields empty - the System requires you to fill in the Name, Surname and E-mail), I find it very inconvenient, unreasonable and suboptimal.
In reply to Дмитрий Курбатов

Re: LDAP server (Sync Plus) - Required fields for entry

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Dear Дмитрий Курбатов

I'm not sure I'm understanding you right. Moodle expects every user to have at least a name, a surname and an email (in addition to a username and password). That expectation is deeply ingrained in Moodle. It will assume those values are always available and will try to use them in lots of places in the code. If they are empty, sometimes you will get very strage behaviour. Oh, I forgot. Moodle needs those values in its own database. Not in an external system that needs to be queried when it needs those fields (for performance and code complexity reasons)

If you already have those values in your LDAP catalog and want to use them, why don't you want Moodle to simply copy those values automatically from LDAP to its own database when the user logs in for the first time (or even every time, if you want to keep them updated). If you tell Moodle how to get those values (you just need to fill in the righ values in the data mapping section) it will do it automatically. No need for placeholders or the user to fill in those values him or herself.

Saludos.

Iñaki.

In reply to Iñaki Arenaza

Re: LDAP server (Sync Plus) - Required fields for entry

by Дмитрий Курбатов -

Hello dear Iñaki Arenaza.

Thank you for your message.

Unfortunately, you really misunderstood me, so I apologize for my poor English.

Of course, the Name, Surname and E-mail as mandatory (necessary) attributes should be stored and processed directly in the Moodle database, and not be retrieved «on the fly» with each request from the LDAP catalog. 😉

My question, or more precisely, the request was directed to the fact that if the LDAP server authentication method (Sync Plus) is set for the user account and further it is assumed that the Name, Surname and E-mail will be automatically filled in (or synchronized) with LDAP
1) at the first user login to the System, or
2) as suggested by the LDAP server plugin (Sync Plus), directly during the creation of a user account manually by the Administrator,
then perhaps it is superfluous to control for the inadmissibility of empty values ​​in the above attributes at the User Interface level (not in the Moodle Database)?


P.S. Our IT-company implements Moodle not in an educational institution, but in a business company - an airline, where the educational process has its own specific features and differs significantly from educational institutions. In particular, it is impossible to automatically create an account in Moodle when you first log into the System, filling in the missing user information from the LDAP. We have requirements, user accounts will only be created centrally by the Administrator.

really hope that my additional explanations will allow you to get constructive suggestions and / or solutions, including that this requires a complete redesign of the user input form to adapt it to LDAP (develop your own plugin).