Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean checkIfUserExists(String username) {
- // TODO check database
- return true;
- }
- private boolean loginUser(String username, password) {
- // TODO ask database
- if (password.equals("password") {
- // TODO get user from database currenlty creating one instead
- User user = new User()
- user.username = username
- user.setAdmin(true) // or false if you want
- // This will log that user in
- getCompany().setCurrentUser(user)
- }
- }
Add Comment
Please, Sign In to add comment