isLoggedIn($params)) { $query = 'select A.id_contact, A.alias, A.given_names, A.family_names, A.names_ordered, A.birthdate, A.notes, C.connection_value from phpgw_cc_contact A, '. 'phpgw_cc_contact_conns B, phpgw_cc_connections C where '. 'A.id_contact = B.id_contact and B.id_connection = C.id_connection '. 'and B.id_typeof_contact_connection = 1 and A.id_owner='.$this -> getUserId().' group by '. ' A.id_contact, A.alias, A.given_names, A.family_names,A.names_ordered,A.birthdate, A.notes,C.connection_value order by lower(A.names_ordered)'; if (!$this->getDb()->query($query)) return false; $contacts = array(); while($this->getDb()->next_record()) { $row = $this->getDb()->row(); $contacts[] = array( 'contactID' => $row['id_contact'], 'MailAddress' => $row['connection_value'], 'AliasName' => $row['alias'], 'FirstName' => $row['given_names'], 'LastName' => $row['family_names'], 'FullName' => $row['names_ordered'], 'BirthDate' => $row['birthdate'], 'Notes' => $row['notes'], // 'ImagePicture' => null ); } $this->result = array ('contacts' => $contacts); } return $this->getResponse(); } public function getGlobalContacts($params){ if($this->isLoggedIn($params)) { $this->result = array ('contacts' => $contacts); } return $this->getResponse(); } }