List groups = Collections.EMPTY_LIST;
if(u.getGroup() != null) {
groups = Collections.singletonList(new Long(u.getGroup().getId()));
}
PrincipalRight pr = WOJServer.getInstance().getDataService().getRightsDao().getConsolidatedPrincipalRight(new Long(u.getId()), groups);
Visibility publishVisibility = pr == null ? Visibility.DEFAULT_VISIBILITY : pr.getPublishVisibility();
UAK uak = new UAK(userName, userPassword, computerIdent, new Long(u.getId()), groups, publishVisibility, pluginId);
if (!uak.isAdmin() && !uak.isServer()) {
if (!WOJServer.getInstance().getDataService().getLoginTraceDao().login(u, computerIdent)) {
LOGGER.info("User : " + u.getLogin() + " has already used a trial on a different computer, login refused");