func (o *User) UnmarshalLDAP(e *ldap.Entry) error {
	o.dn = e.DN

	for _, v := range e.GetAttributeValues("objectClass") {
		switch strings.ToLower(v) {
		case "person":
			o.Person = true
		case "posixaccount":
			o.PosixAccount = true

		}
	}

	o.Cn = e.GetAttributeValues("cn")
	o.GidNumber = e.GetAttributeValue("gidNumber")
	o.HomeDirectory = e.GetAttributeValue("homeDirectory")
	o.Sn = e.GetAttributeValues("sn")
	o.Uid = e.GetAttributeValues("uid")
	o.UidNumber = e.GetAttributeValue("uidNumber")

	o.Description = e.GetAttributeValues("description")
	o.Gecos = e.GetAttributeValue("gecos")
	o.LoginShell = e.GetAttributeValue("loginShell")
	o.SeeAlso = e.GetAttributeValues("seeAlso")
	o.TelephoneNumber = e.GetAttributeValues("telephoneNumber")
	o.UserPassword = e.GetAttributeValues("userPassword")
	return nil
}