function GetHublocs($address) { // Try and find a hubloc for the person attempting to auth. // Since we're matching by address, we have to return all entries // some of which may be from re-installed hubs; and we'll need to // try each sequentially to see if one can pass the test $x = q("select * from hubloc left join xchan on xchan_hash = hubloc_hash \n\t\t\twhere hubloc_addr = '%s' order by hubloc_id desc", dbesc($address)); if (!$x) { // finger them if they can't be found. $j = Finger::run($address, null); if ($j['success']) { import_xchan($j); $x = q("select * from hubloc left join xchan on xchan_hash = hubloc_hash \n\t\t\t\t\twhere hubloc_addr = '%s' order by hubloc_id desc", dbesc($address)); } } if (!$x) { logger('mod_zot: auth: unable to finger ' . $address); $this->Debug('no hubloc found for ' . $address . ' and probing failed.'); $this->Finalise(); } return $x; }