Where is the code that generates the SQL for the project list query? If possible, I’d like to process the account ids a little before they are inserted…
SELECT SQL_CALC_FOUND_ROWS egw_pm_projects.*,
egw_pm_projects.pm_id AS pm_id,
Bit_or(role_acl) AS role_acl
FROM egw_pm_projects
LEFT JOIN egw_pm_members
ON ( egw_pm_projects.pm_id = egw_pm_members.pm_id
AND member_uid IN ( 101, -33, -100, -56,
-53, -95, -34, -1, -78 ) )
LEFT JOIN egw_pm_roles
ON egw_pm_members.role_id = egw_pm_roles.role_id
LEFT JOIN egw_links
ON link_app2 = 'projectmanager'
AND link_app1 = 'projectmanager'
AND link_id2 = egw_pm_projects.pm_id
WHERE pm_status = 'active'
AND ( pm_access = 'anonym'
OR pm_access = 'public'
AND pm_creator IN ( 57, -28, 6, 7,
9, 18, 20, 22,
42, 51, 98, 102,
105, 26, 47, 54,
55, 79, 82, 93, 101 )
OR pm_access = 'private'
AND pm_creator IN ( 98, 47, 82, 101 )
OR role_acl != 0 )
AND link_id2 IS NULL
GROUP BY egw_pm_projects.pm_id
ORDER BY pm_modified DESC
LIMIT 0, 50;
*SQL is slightly different for each user because of groups/privs/etc