Admittedly, with this bug, I don't have a local LDAP to test against. But, I'm logging this based on these recent dspace-tech threads (and based on skimming the code):
As far as I can tell, the LDAPAuthentication plugin looks like it will ONLY support auto-registration for Hierarchical LDAP. It seemingly does NOT work properly if you only specify "object_context" (and not the various Hierarchical search.* settings).
Looking more closely at the LDAPAuthentication class, it looks like the user fields (email, givenname, surname, etc.) are only loaded whenever "SpeakerToLDAP.getDNOfUser()" is called:
However, getDNOfUser() is ONLY called when either "search.anonymous=true" OR "search.user" is specified..see:
This seems to imply that, if you have a flat structure in LDAP (i.e. all users are simply under "object_context"), while individuals can authenticate successfully, auto-registration will NEVER work properly (as the user's name, email, etc is never queried from LDAP).
This behavior seems to be exactly the same as what is reported on 'dspace-tech'.
Until this bug is fixed, I suspect one could "workaround" this by simply specifying "search.anonymous=true" or "search.user" on a flat LDAP scheme. For more info, see the LDAP Docs: https://wiki.duraspace.org/display/DSDOC5x/Authentication+Plugins#AuthenticationPlugins-ConfiguringHierarchicalLDAPAuthentication