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
function, but - methods. Hence - 'self' should be used, and not 'cls'.
Also - use a constant for duplicate string literal in LDAP
authentication implementation.