public UserController registerNormalUser(string email, string userName, string password, [FromBody] string value) { UserController user = userFinder.findUser(email); if (user != null) { return(null); } NormalUserController normalUser = new NormalUserController(email, userName, password); normalUserRepo.addUser(normalUser.getNormalUser()); return(normalUser); }
public User login(string email, string password) { UserController user = userFinder.findUser(email); if (user == null || !user.getPassword().Equals(password)) { return(null); } Global.setSession(user); return(user.getModel()); }