Commit 1b4f025e by Tuukka Kivilahti

trylogin

1 parent 2a7c9cde
......@@ -91,7 +91,13 @@ public class SessionHandlerBean implements SessionHandlerBeanLocal {
}
public User tryLogin(String username, String password) {
throw new UnsupportedOperationException("Not supported yet.");
User user = userfacade.findByLogin(username.trim());
if(User.hashPassword(password).equals(user.getPassword())) {
return user;
}
return null;
}
public User getDefaultUser() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!