LDAPAccountManager / lam

LDAP Account Manager
https://www.ldap-account-manager.org
Other
429 stars 69 forks source link

Needed star or required icon in user registration of first name and email , in 6.8 version this feature is available #338

Closed BhaskarraoP closed 2 months ago

BhaskarraoP commented 3 months ago

Hello Team, I am upgrading my lam to 6.8 to 8.7, rightnow i have noticed the following thing i need the required icon or start icon in the user registration form in the fields of first name and email. Here is the reference can you please give me the details like were can i get this feature enabled in code.

image

Any help would be helpfull. Thanks

gruberroland commented 3 months ago

For user self registration you can simply use "required" instead of "optional" for your field definition. See: https://www.ldap-account-manager.org/static/doc/manual/ch07s03.html#idm5928

The screenshot shows the admin interface. Here, there is no configuration option to make the field required. You could use a custom JavaScript for this: https://www.ldap-account-manager.org/static/doc/manual/apf.html

BhaskarraoP commented 3 months ago

Hello @gruberroland Thanks for the details i am gone with second approach as we are not using the first you mentioned. So can you mention the the files and line no of the code were this first and email id is present so that i can add the changes there. As i want to make it as required field. In earlier lam 6.8 this fields are mandatory.

Thanks..

gruberroland commented 3 months ago

Please see /usr/share/ldap-account-manager/lib/modules/inetOrgPerson.inc and function display_html_attributes() if you would like to patch the code.

BhaskarraoP commented 3 months ago

Hello @gruberroland Thanks for the suggestion it worked. I am not good at php it was good experience. But i encountered another issue as this fields first,email are required, i can create the user without adding details. Is there any clue were to look in the code base or function. Thanks

Also one suggestion for lam UI. In the user creation form the fields of personal and unix section, if it could be placed in left it would be better.

image image

Thanks once again

gruberroland commented 3 months ago

Not sure if I got you right, did you mean that saving is possible even if star icon is displayed? Please check process_attributes() in this case. This includes all the checks for the input data. For the layout I will create a separate issue. As the fields are very different per module this is not that easy to be perfectly aligned.

BhaskarraoP commented 2 months ago

Hello @gruberroland Thanks for the support. One final question after that i will close the request. Is there any possibility to make the UID Number field readonly? Thanks

gruberroland commented 2 months ago

There is no option to make uidNumber read-only. In this case, you would need to adapt posixAccount.inc (display_html_attributes()).