Beispiel #1
0
 public void addUser(
     int privilegeId,
     String login,
     String password,
     String email,
     String firstName,
     String lastName) {
   Users user = new Users();
   user.setLogin(login);
   user.setPassword(password);
   user.setEmail(email);
   user.setFirstName(firstName);
   user.setLastName(lastName);
   user.setPrivilegesByPrivilegeId(privilegesDAO.get(privilegeId));
   usersDAO.create(user);
   logger.info("User added successfully in method addUser() in class UsersServices");
 }
Beispiel #2
0
 public void editUserInfo(
     int id,
     String login,
     String password,
     String email,
     String firstName,
     String lastName,
     Integer privilegeId) {
   Users user = usersDAO.get(id);
   user.setLogin(login);
   user.setPassword(password);
   user.setEmail(email);
   user.setFirstName(firstName);
   user.setLastName(lastName);
   user.setPrivilegesByPrivilegeId(privilegesDAO.get(privilegeId));
   usersDAO.update(user);
   logger.info("User's info changed successfully in method editUserInfo() in class UsersServices");
 }