Hi again
I have a couple of instances of Ari Data tables and need to customise each one to display only permitted information based on the user group the logged in user is assigned to. So this is my current query which shows records made by the current logged in user based on their registered email.
SELECT (CASE WHEN state = '1' THEN 'Accepted' WHEN state = '-2' THEN 'Waiting' WHEN state = '-1' THEN 'Archived' WHEN state = '0' THEN 'Rejected' ELSE 'Unknown' END) AS Status, s.names, s.phone, FROM_UNIXTIME(datetime1,'%d/%m/%y %T'), s.begin, s.PickupAddr1, s.end, s.PickupAddr4, s.message, s.selpassengers, s.selluggage, IF(s.returntrip=0, 'No', 'Yes'), IF(FROM_UNIXTIME(datetime2,'%Y') = '1970', NULL, FROM_UNIXTIME(datetime2, '%d/%m/%y %T')), tc.title AS Vehicle, s.cprice, pm.title As Payment, s.payment, s.selinfantseats, s.selchildseats, s.selboosterseats, s.selcarry, s.email, s.id, s.prepay, s.vehicletype FROM #__taxibooking_orders s
INNER JOIN #__taxibooking_cars tc ON tc.id = s.vehicletype
INNER JOIN #__taxibooking_paymentmethods pm ON pm.id = s.payment
WHERE s.email = {$UserEmail}
What I need is to modify this so that the records displayed are those created by anyone in the 'supervisor' user group. Are you able to assist please?
Thanks
|