* @param password The plain-text password
* @return True if the login was successful, false otherwise
*/
public boolean doLogin(String username, String password) {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
user = (User) session.createQuery("from User where username = ?").setString(0, username).uniqueResult();
try {
if (user.authenticate(password)) {
//session.getTransaction().commit();
return true;