We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f23ace commit a84b644Copy full SHA for a84b644
lib/private/Avatar/Avatar.php
@@ -93,12 +93,11 @@ private function getAvatarText(): string {
93
$displayName = $this->getDisplayName();
94
if (empty($displayName) === true) {
95
return '?';
96
- } else {
97
- $firstLetters = array_map(function ($namePart) {
98
- return mb_strtoupper(mb_substr($namePart, 0, 1), 'UTF-8');
99
- }, explode(' ', $displayName));
100
- return implode('', array_slice($firstLetters, 0, 2));
101
}
+ $firstTwoLetters = array_map(function ($namePart) {
+ return mb_strtoupper(mb_substr($namePart, 0, 1), 'UTF-8');
+ }, explode(' ', $displayName, 2));
+ return implode('', $firstLetters);
102
103
104
/**
0 commit comments