diff --git a/addressbook/inc/class.contacts_sql.inc.php b/addressbook/inc/class.contacts_sql.inc.php index 52121bc3a5..d9afac4455 100644 --- a/addressbook/inc/class.contacts_sql.inc.php +++ b/addressbook/inc/class.contacts_sql.inc.php @@ -368,7 +368,12 @@ } } - $fwhere .= $filtermethod . " AND (owner=" . $phpgw_info['user']['account_id']; + if (!$filtermethod) { + $fwhere .= " WHERE (owner=" . $phpgw_info['user']['account_id']; + } else { + $fwhere .= $filtermethod . " AND (owner=" . $phpgw_info['user']['account_id']; + } + if (is_array($this->grants)) { $grants = $this->grants;