public boolean updateUser(String userLogin, User newUser) {
        try {
            String stm = String.format("UPDATE users SET login = '%s', password = '%s',name = '%s', surname = '%s', city_name = '%s', country_name = '%s' WHERE login = '%s';",
                    newUser.getUserLogin(),newUser.getUserPassword(),newUser.getUserName(),newUser.getUserSurname(),newUser.getUserCity(),newUser.getUserCountry(),userLogin);
            Statement updateUser = waggrConnection.createStatement();
            int i = updateUser.executeUpdate(stm);
            if (i != 0) {
                updateUser.close();
                return true;
            }
            updateUser.close();
        } catch (SQLException e) {
            e.printStackTrace();
            System.out.println("update user exception");
        }
        return false;
    }