Why do you want to log in via both CAS and LDAP? You can / must provide LDAP settings in the CAS plugin settings. If you want to allow both since people are coming from two different systems, you can look into the usersuniquebyusername experimental setting.