public void updateUserbyUserName(final String name, final String pass, final String phone,
            final int type) {

        for (User u : userList.getUserList()) {
            if (name.equals(u.getName())) {
                u.setPassword(pass);
                u.setPhoneNumber(phone);
                u.setType(type);
            }
        }
        writeUserList();
    }