This content has been marked as final.
Show 1 reply
-
1. Re: Sample login form
sappo May 18, 2010 12:47 PM (in response to olasamuel)Hi Olalekan,
in your authentication bean you can try something like this:
@In EntityManager entityManager; @In Credentials credentials; public bool authenticate() { String user = credentials.getUsername(); String pass = credentials.getPassword(); List<User> userList = entityManager.createQuery([Your Query]).getResultList; if(userList.isEmpty()) { return true; } else { return false; } }