wheelybird / ldap-user-manager

A PHP web-based interface for LDAP user account management and self-service password change.
MIT License
489 stars 108 forks source link

Warning when displaying people without given name #213

Open dbrw opened 1 year ago

dbrw commented 1 year ago

People with mononym (single worded name) are supposed to save their name as surname (sn) since sn is required attribute in openldap. While I can create the user, I see warning on user list as bellow:

Warning: Undefined array key "givenname" in /opt/ldap_user_manager/account_manager/index.php on line 67

Looks like the UI wants to access givenname while it's nonexistent. This could be supressed using error_reporting(E_ERROR | E_PARSE);, it's better to handle the null value properly.