Exemplo n.º 1
0
 @Loggable(enable = false)
 public Usuarios loggar(String email, String senha) throws BOException {
   if (email.trim().equals("") || senha.trim().equals("")) {
     throw new BOException("Email e/ou senha não informados.");
   }
   Usuarios usuario = usuarioDAO.buscarPorEmailSenha(email, senha);
   if (usuario != null) {
     if (!usuario.isAtivo()) {
       throw new BOException("Sua conta está inativa, entre em contato para reativá-la.");
     }
   }
   return usuario;
 }