/** * [DEPRECATED] General people search function. * * Takes a string of parameters as input and requests profile data from the * Linkedin People Search API. See the official documentation for $options * querystring formatting: * * http://developer.linkedin.com/docs/DOC-1191 * * @param str $options * [OPTIONAL] Data retrieval options. * * @return arr * Array containing retrieval success, LinkedIn response. */ public function search($options = NULL) { return searchPeople($options); }
/** * [DEPRECATED] General people search function. * * Takes a string of parameters as input and requests profile data from the * Linkedin People Search API. See the official documentation for $options * querystring formatting: * * http://developer.linkedin.com/docs/DOC-1191 * * @param str $options * [OPTIONAL] Data retrieval options. * * @return arr * array containing retrieval success, LinkedIn response. */ public function search($options = null) { return searchPeople($options); }
// Setup the default params $params = array("page" => 1, "limit" => 10, "query" => "", "sort" => "default", "action" => "browse", "type" => "people"); // Check to see if values are set, overwrite defaults if set foreach ($params as $k => $v) { if (isset($_REQUEST[$k])) { $params[$k] = strtolower(safeString($_REQUEST[$k])); } } $action = $params['action']; $type = $params['type']; $query = $params['query']; $page = $params['page']; $limit = $params['limit']; $sort = $params['sort']; if ($action == "search") { $data = searchPeople($query, $page, $limit, $sort); } else { $data = browsePeople($page, $limit); } $status = 200; break; case "getVisualizations": // Setup the default params $params = array("page" => 1, "limit" => 10, "query" => "", "sort" => "default", "action" => "browse", "type" => "people"); // Check to see if values are set, overwrite defaults if set foreach ($params as $k => $v) { if (isset($_REQUEST[$k])) { $params[$k] = strtolower(safeString($_REQUEST[$k])); } } $action = $params['action'];
if (isset($showExtendedInfo) && GET_uid()) { if (isPersonMatchingFilter(GET_uid(), $LEVEL1_FILTER)) { if (isPersonMatchingFilter(GET_uid(), $LEVEL2_FILTER)) { $allowExtendedInfo = 2; } else { $allowExtendedInfo = 1; } } } if ($allowExtendedInfo >= 1) { $LDAP_CONNECT = $allowExtendedInfo == 2 ? $LDAP_CONNECT_LEVEL2 : $LDAP_CONNECT_LEVEL1; global_ldap_open('reOpen'); } // most attributes visibility are enforced using ACLs on LDAP bind // here are a few special cases if ($allowExtendedInfo < 1) { foreach (array('memberOf', 'memberOf-all') as $attr) { unset($wanted_attrs[$attr]); } } if ($allowInvalidAccounts) { $allowInvalidAccounts = $allowExtendedInfo >= 1; } $attrRestrictions = array('allowListeRouge' => $allowExtendedInfo > 0 || @$isTrustedIp || GET_uid() && isStaffOrFaculty(GET_uid()), 'allowMailForwardingAddress' => $allowExtendedInfo > 1, 'allowEmployeeType' => $allowExtendedInfo > 1); $users = searchPeople(people_filters($token, $restriction, $allowInvalidAccounts), $attrRestrictions, $wanted_attrs, $KEY_FIELD, $maxRows); if ($allowExtendedInfo) { foreach ($users as &$u) { $u["allowExtendedInfo"] = $allowExtendedInfo; } } echoJson($users);
} $action = $params['action']; $type = $params['type']; $query = $params['query']; $page = $params['page']; $limit = $params['limit']; $sort = $params['sort']; // Determine the results if ($action == "search") { if ($type == "visualizations") { $results = searchVisualizations($query, $page, $limit, $sort); $count = searchVisualizations($query, -1, $limit, $sort); } else { if ($type == "people") { $results = searchPeople($query, $page, $limit, $sort); $count = searchPeople($query, -1, $limit, $sort); } else { $results = searchExperiments($query, $page, $limit, $sort); $count = searchExperiments($query, -1, $limit, $sort); } } } else { if ($action == "browse") { if ($type == "visualizations") { $results = browseVisualizationsByTimeCreated($page, $limit); $count = browseVisualizationsByTimeCreated(-1, $limit); } else { if ($type == "people") { $results = browsePeople($page, $limit); $count = browsePeople(-1, $limit); } else {