String defaultGroup = mapping.get("privilege")[1];
Map<String, ArrayList<String>> userInfo = LDAPUtils
.convertAttributes(userCtx.getAttributes().getAll());
LDAPUser userDetails = new LDAPUser(username);
User user = userDetails.getUser();
user.setName(getUserInfo(userInfo, "name"))
.setSurname(getUserInfo(userInfo, "surname"))
.setOrganisation(getUserInfo(userInfo, "organisation"));
user.getEmailAddresses().clear();
user.getEmailAddresses().add(getUserInfo(userInfo, "mail"));