Fallback for empty names

This commit is contained in:
Michael Vogel 2016-07-10 09:27:40 +02:00
parent f27bc00464
commit b9da831138

View file

@ -232,10 +232,15 @@ class Probe {
else
$data["photo"] = App::get_baseurl().'/images/person-175.jpg';
if (!isset($data["name"]))
$data["name"] = $data["url"];
if (!isset($data["name"]) OR ($data["name"] == "")) {
if (isset($data["nick"]))
$data["name"] = $data["nick"];
if (!isset($data["nick"])) {
if ($data["name"] == "")
$data["name"] = $data["url"];
}
if (!isset($data["nick"]) OR ($data["nick"] == "")) {
$data["nick"] = strtolower($data["name"]);
if (strpos($data['nick'], ' '))