X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fidentity.php;h=eebb8fe51af68b2c0749f8f42e0ae74c6406aa88;hb=008c97c570ea62749a3f486b42c424365863d627;hp=9a0900dc1f14db2fe74bf50d02228985a84c2291;hpb=e437c74d0e4e4ece4693a2e32513c3ecde7efb4d;p=friendica.git diff --git a/include/identity.php b/include/identity.php index 9a0900dc1f..eebb8fe51a 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)))); + $splitted_name = Diaspora::splitName($profile['name']); + $firstname = $splitted_name['first']; + $lastname = $splitted_name['last']; if ($profile['guid'] != "") { $diaspora = array(