public boolean userExists(UserModel user) { UserDAO userDAO = new UserDAO(); if (userDAO.getByLogin(user.getLogin()) != null) { return true; } return false; }
public void register(UserModel user) { UserDAO userDAO = new UserDAO(); user.setType("user"); userDAO.save(user); }