How to make LDAP surname non-mandatory

How to make LDAP surname non-mandatory

by Mohan Pillai -
Number of replies: 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

Average of ratings: -
In reply to Mohan Pillai

Re: How to make LDAP surname non-mandatory

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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.
In reply to Howard Miller

Re: How to make LDAP surname non-mandatory

by 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

In reply to Mohan Pillai

Re: How to make LDAP surname non-mandatory

by adrian don -
How did you make it possible? I tried to change the value but still failed.It requires to insert input the field.
In reply to Mohan Pillai

Re: How to make LDAP surname non-mandatory

by LeelaVinodh Ramachandran -

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

Thanks

Leela

In reply to LeelaVinodh Ramachandran

Re: How to make LDAP surname non-mandatory

by 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!