}
else {
$fromClause = " INNER JOIN civicrm_acl_contact_cache aclContactCache ON {$contactAlias}.id = aclContactCache.contact_id ";
- $whereClase = " aclContactCache.user_id = $contactID ";
+ $whereClase = " aclContactCache.user_id = $contactID AND $contactAlias.is_deleted = 0";
}
return array($fromClause, $whereClase);
public function where($includeContactIDs = FALSE) {
if ($whereClause = $this->_query->whereClause()) {
if ($this->_aclWhere) {
- $whereClause .= " AND {$this->_aclWhere} AND contact_a.is_deleted = 0";
+ $whereClause .= " AND {$this->_aclWhere}";
}
return $whereClause;
}
$where = '(1)';
if ($this->_aclWhere) {
$where .= " AND {$this->_aclWhere} ";
- $where .= " AND contact_a.is_deleted = 0";
}
return $where;
}
$clause[] = "cgc.group_id = {$this->_group}";
}
if ($this->_aclWhere) {
- $clause[] = " {$this->_aclWhere} AND contact_a.is_deleted = 0";
+ $clause[] = " {$this->_aclWhere}";
}
$where = '( 1 )';
);
if ($this->_aclWhere) {
- $where .= " AND {$this->_aclWhere} AND contact_a.is_deleted = 0";
+ $where .= " AND {$this->_aclWhere} ";
}
return $this->whereClause($where, $params);
}