/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package controller;
import dao.DaoUser;
import model.User;
/**
*
* @author GuillermoLuis
*/
public class ControllerLogIn {
public boolean LogIn(String user, String pass){
DaoUser daoUser = new DaoUser();
for(User u: daoUser.FindAllUser()){
if(u.getUser().equals(user)&& u.getPass().equals(pass)){
return true;
}
}
return false;
}
public User getUsuario(String user, String pass){
DaoUser daoUser = new DaoUser();
for(User u: daoUser.FindAllUser()){
if(u.getUser().equals(user)&& u.getPass().equals(pass)){
return u;
}
}
return null;
}
}