There are two issues detected in authentication.update API method:
- There is able to leave optional the ldap_userdirectoryid field or set it to empty ID when LDAP authentication is enabled. According the documentation this field is required in that case.
There is able to set some existing user directory ID for the ldap_userdirectoryid field when it LDAP authentication is disabled. It's expected that only empty ID value can be accepted in that case.- When LDAP authentication is disabled, we should also allow to set the existing ID or zero for ldap_userdirectoryid.