I'm developing a 3rd party component which does a simple search and display of an additional table which I've added to the database.
The components working well, but the client has now asked me to limit the search by resource group id, so that logged in users can only retrieve info from their rows, we've updated the database so that user id's now reflect resource group id's so all I need to do now is update the search in my script.
Is the logged in resource group id freely available to snippets? I was hoping it would be and I could just place it in a variable and search against that. I've done some searching this morning but havnt been able to find a lot of info, which leaves me thinking maybe I'm approaching things from the wrong angle.
This is my current query.
$query->where(array('accNumber:LIKE' => "$accNo%"));
$query->andCondition(array('accName:LIKE' => "%$accName%"));
$query->andCondition(array('saleProperty:LIKE' => "%$saleProperty%"));
// Search against resource group
$query->andCondition(array('clientNumber' => "3"));