X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fidentity.php;h=8f515580f475cba0cb28651a24a71b6ccb41447d;hb=0305aa2d8218a0919526a08910ffaebfdc5bb2c5;hp=9a0900dc1f14db2fe74bf50d02228985a84c2291;hpb=5ba6c7717a06842c27fec15508ff8cabb3d9a31b;p=friendica.git diff --git a/include/identity.php b/include/identity.php index 9a0900dc1f..8f515580f4 100644 --- a/include/identity.php +++ b/include/identity.php @@ -13,6 +13,7 @@ use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\Contact; +use Friendica\Protocol\Diaspora; require_once 'include/bbcode.php'; require_once 'mod/proxy.php'; @@ -374,9 +375,9 @@ function profile_sidebar($profile, $block = 0) $location = $pdesc = $gender = $marital = $homepage = $about = false; } - $firstname = ((strpos($profile['name'], ' ')) - ? trim(substr($profile['name'], 0, strpos($profile['name'], ' '))) : $profile['name']); - $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'], strlen($firstname)))); + $split_name = Diaspora::splitName($profile['name']); + $firstname = $split_name['first']; + $lastname = $split_name['last']; if ($profile['guid'] != "") { $diaspora = array(