@Override public UserDetails loadUserByUsername(String string) throws UsernameNotFoundException { logger.info("Loading user " + string); UserAccount user = userDao.getUser(string); if (user == null) { logger.warn("Failed to find user in database"); throw new UsernameNotFoundException("User not found"); } logger.info("Found user " + user.toString()); return userAssembler.buildUserFromUserEntity(user); }
public void addUser(UserAccount user) throws TaskTrackerException { userDao.addUser(user); }