/** * @param $id * @param string $table * * @return array|null */ static function &lastModified($id, $table = 'civicrm_contact') { $log = new CRM_Core_DAO_Log(); $log->entity_table = $table; $log->entity_id = $id; $log->orderBy('modified_date desc'); $log->limit(1); $result = CRM_Core_DAO::$_nullObject; if ($log->find(TRUE)) { list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id); $result = array('id' => $log->modified_id, 'name' => $displayName, 'image' => $contactImage, 'date' => $log->modified_date); } return $result; }