Changed getAttributes function to always return an array of values, because ldap supports multiple values for an attribute