public List<Integer> getSecondaryGroups(Connection con, String user) {
		List<Integer> groups = new ArrayList<>();
		/* Compose query. */
		String SQL_QUERY = "SELECT secondary_group_ids "
				+ "FROM xf_user "
				+ "WHERE username=?;";

		/* Execute query. */
		try {
			PreparedStatement stmt = con.prepareStatement(SQL_QUERY);
			stmt.setString(1, user);
			ResultSet rs = stmt.executeQuery();
			
			/* Return first result, go from csv to int[]. */
			if(rs.next()) {
				String csv = rs.getString("secondary_group_ids");
				String[] split = csv.split(",\\s*");
				for(int i = 0; i < split.length; ++i) {
					if(!split[i].equals(""))
						groups.add(Integer.valueOf(split[i]));
				}
			}
		} catch (SQLException e) {
			e.printStackTrace();
			
		}
		return groups;
	}