// prepare attributes and add the new user to LDAP
Attributes attributes = prepareRegistrationAttributes(upCreds,user.getProfile());
addEntry(dirContext,user.getDistinguishedName(),attributes);
// add user to general user group
Roles configuredRoles = getConfiguration().getIdentityConfiguration().getConfiguredRoles();
if (configuredRoles.getAuthenticatedUserRequiresRole()) {
String sRoleRegistered = configuredRoles.getRegisteredUserRoleKey();
Role roleRegistered = configuredRoles.get(sRoleRegistered);
String sGeneralDN = roleRegistered.getDistinguishedName();
String sGroupAttribute = groupProps.getGroupMemberAttribute();
BasicAttribute groupAttribute = new BasicAttribute(sGroupAttribute);
BasicAttributes groupAttributes = new BasicAttributes();
groupAttribute.add(user.getDistinguishedName());