"\n Username: "+ action.getUserToCreate().getUsername()+
"\n Recieved password: "+ action.getUserToCreate().getHashedPassword()+
"\n Email: " +action.getUserToCreate().getEmail());
String sessionId = null;
String dataStoreId = null;
User userToCreate = action.getUserToCreate();
if(userToCreate == null )
{
log.severe("\nreturned because userToCreate was null!!!");
return new CreateUserResult(sessionId, dataStoreId);
}
else {
dataStoreId = dao.createUser(userToCreate);
log.severe("\n From dao.CreateUser(), the datastoreId is: " +dataStoreId);
if (dataStoreId != null) {
HttpSession session = requestProvider.get().getSession();
session.setAttribute("login.authenticated", userToCreate.getUsername());
sessionId = session.getId();
return new CreateUserResult(sessionId, dataStoreId);
}
else return new CreateUserResult(sessionId, dataStoreId) ;
}