);
if($r && count($r))
return $r[0];
+
+ $handle_parts = explode("@", $handle);
+ $nurl_sql = '%%://' . $handle_parts[1] . '%%/profile/' . $handle_parts[0];
+ $r = q("SELECT * FROM contact WHERE network = '%s' AND uid = %d AND nurl LIKE '%s' LIMIT 1",
+ dbesc(NETWORK_DFRN),
+ intval($uid),
+ dbesc($nurl_sql)
+ );
+ if($r && count($r))
+ return $r[0];
+
return false;
}
$contact = diaspora_get_contact_by_handle($importer['uid'],$diaspora_handle);
if(! $contact) {
- logger('diaspora_signed_retraction: no contact');
+ logger('diaspora_signed_retraction: no contact ' . $diaspora_handle . ' for ' . $importer['uid']);
return;
}