in /lib/lib.template.php, nella funzione getTemplate() si trova questa query che serve a capire qual è il template associato all'utente:
Code: Select all
$qtxt = "SELECT ct.associated_template FROM
%adm_org_chart_tree
WHERE associated_template IS NOT NULL AND
idst_oc IN (".implode(',', Docebo::user()->getArrSt()).")
ORDER BY iLeft DESC
LIMIT 0,1";
Se il ragionamento vi "quadra", io proporrei questa modifica alla query:
Code: Select all
$qtxt = "SELECT ct.associated_template FROM
%adm_org_chart_tree as ct
INNER JOIN %adm_group_members as gm ON ct.idst_oc = gm.idst
WHERE ct.associated_template IS NOT NULL AND
ct.idst_oc IN (".implode(',', Docebo::user()->getArrSt()).")
AND gm.idstMember = ".Docebo::user()->getIdSt()."
ORDER BY ct.iLeft DESC
LIMIT 0,1";