How to make LDAP surname non-mandatory

How to make LDAP surname non-mandatory

por Mohan Pillai -
Número de respostas: 5

Hello,

We use LDAP authentication in our moodle 1.9 on a linux box. I would like to make for a new user who logs in for the first time not to enter any details in their profile. If I map displayName of the user to firstname in moodle and leave lastname field blank and locked, when the user logs in it keeps asking to tell me more about yourself and if you do not enter any values and save it, it does not save and keeps asking for the info. Whereas If I map lastname field to SN of LDAP(unlocked if empty) then it will ask the user to enter the lastname if blank. In our LDAP displayName has the user full name which I would like to show as firstname in moodle without the last name added to it. So I would like to make the surname field in moodle non-mandatory. How do I make it possible. May be if update mdl_user lastname column null=YES, will it solve my issue.

thanks
-Mohan

Em resposta a 'Mohan Pillai'

Re: How to make LDAP surname non-mandatory

por Howard Miller -
Foto de Core developers Foto de Documentation writers Foto de Particularly helpful Moodlers Foto de Peer reviewers Foto de Plugin developers
Moodle generally requires a minimum firstname, lastname and email to be present. It's not just an LDAP thing.

Can I ask what your aim is here? There may be a better way round about this.
Em resposta a 'Howard Miller'

Re: How to make LDAP surname non-mandatory

por Mohan Pillai -


Thanks. Anyways I have sorted out this issue by modifying the table mdl_user lastname column. Moodle does not require a minimum firstname,lastname is proved by doing so.

-Mohan

Em resposta a 'Mohan Pillai'

Re: How to make LDAP surname non-mandatory

por LeelaVinodh Ramachandran -

How did you to mange to make LDAP surname non-mandatory. pls breif , i am new to moodle.

Thanks

Leela

Em resposta a 'LeelaVinodh Ramachandran'

Re: How to make LDAP surname non-mandatory

por Judy Hsu -

Hi I'm curious about this too.

We have a project that we are hoping that users can be authenticated on another web site (not Moodle based), then with single-sign-on, they will then automatically be logged in to the Moodle site. However on the Moodle site we don't want to keep the firstname, lastname, and email addresses in the mdl_user table (the only "link" would be the username, for privacy reasons, etc.). Normally how would people do to achieve this, and would this require touching the Moodle core codes (which we don't want to, as it would add more complication for future upgrades, etc.). Thanks you!