шпаргалки
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
669 B

2 years ago
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package propertiesswing2;
/**
*
* @author denis
*/
public class UserCheck {
public boolean check(String username, String password){
if(username==null || username.isEmpty() || password == null || password.isEmpty()) return false;
for (User user : PersonStore.getPersonStore().getPersons()){
if(user.getUsername().equals(username) && user.getPassword().equals(password)) return true;
}
return false;
}
}