}
}
}
+ // Don't create accounts of people who just comment something
+ $createuser = false;
} else
$postarray['thr-parent'] = $postarray['uri'];
if(!count($r) AND !$create_user)
return($me);
+ if ($contact["canonical_url"] == "")
+ return($me);
if (count($r) AND ($r[0]["readonly"] OR $r[0]["blocked"])) {
logger("appnet_fetchcontact: Contact '".$r[0]["nick"]."' is blocked or readonly.", LOGGER_DEBUG);
}
if(!count($r)) {
+
+ if ($contact["name"] == "")
+ $contact["name"] = $contact["username"];
+
+ if ($contact["username"] == "")
+ $contact["username"] = $contact["name"];
+
// create contact record
q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`,
`name`, `nick`, `photo`, `network`, `rel`, `priority`,
}
if ($contact_id <= 0) {
+ // To-Do:
+ // $contacts[$post->source_id] seems to be wrong by repeated posts
+ // must be changed in future
$contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], $create_user);
if ($contact_id == -1) {
function pumpio_get_contact($uid, $contact) {
+ if (($contact->url == "") OR ($contact->id == 0))
+ return(false);
+
$r = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
dbesc(normalise_link($contact->url)));