isset($data["pubkey"]) AND ($hcard != "")) {
$data["network"] = NETWORK_DIASPORA;
+ // The Diaspora handle must always be lowercase
+ $data["addr"] = strtolower($data["addr"]);
+
// We have to overwrite the detected value for "notify" since Hubzilla doesn't send it
$data["notify"] = $data["baseurl"]."/receive/users/".$data["guid"];
$data["batch"] = $data["baseurl"]."/receive/public";
dbesc($arr["photo"]),
dbesc($arr["request"]),
dbesc($arr["nick"]),
- dbesc($arr["addr"]),
+ dbesc(strtolower($arr["addr"])),
dbesc($arr["guid"]),
dbesc($arr["batch"]),
dbesc($arr["notify"]),
$r = q("SELECT `addr` FROM `gcontact` WHERE `id` = %d AND `addr` != ''",
intval($gcontact_id));
if ($r)
- return $r[0]["addr"];
+ return strtolower($r[0]["addr"]);
}
$r = q("SELECT `network`, `addr`, `self`, `url`, `nick` FROM `contact` WHERE `id` = %d",
}
}
- return $handle;
+ return strtolower($handle);
}
/**
* @return bool Success
*/
private function receive_profile($importer, $data) {
- $author = notags(unxmlify($data->author));
+ $author = strtolower(notags(unxmlify($data->author)));
$contact = self::contact_by_handle($importer["uid"], $author);
if (!$contact)