Example #1
0
    /**
     * Get the data for all reportee from the database
     *
     * @param	array	$reportee_ids	Array with the user ids of the reportees
     *
     * @return	array		Returns an array with the reportee data
     */
    protected function get_reportee_data(array $reportee_ids)
    {
        $reportee_ids = array_unique($reportee_ids);
        $reportee_data_list = array();
        $sql = 'SELECT user_id, username, user_colour
			FROM ' . USERS_TABLE . '
			WHERE ' . $this->db->sql_in_set('user_id', $reportee_ids);
        $result = $this->db->sql_query($sql);
        while ($row = $this->db->sql_fetchrow($result)) {
            $reportee_data_list[$row['user_id']] = $row;
        }
        $this->db->sql_freeresult($result);
        return $reportee_data_list;
    }