if(!empty($q['query']['name'])){
$this->whereAdd("
- Person.name LIKE '%{$this->escape($q['query']['name'])}%'
+ {$this->tableName()}.name LIKE '%{$this->escape($q['query']['name'])}%'
");
}
// determine if it's staff!!!
$owncomp = DB_DataObject::Factory('Companies');
$owncomp->get('comptype', 'OWNER');
- $isStaff = ($this->company_id == $owncomp->id);
+ $isStaff = ($au->company_id == $owncomp->id);
if (!$isStaff) {