Ensure error should be handled properly when LDAP user is created with the same name. Fixes #5420 Fixed an issue where an internal user is not created if the authentication source is set to internal and ldap. Fixes #5432