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 6ce75a4 commit 1f6f5fdCopy full SHA for 1f6f5fd
src/helpers.php
@@ -55,7 +55,7 @@ function backpack_users_have_email()
55
*/
56
function backpack_avatar_url($user)
57
{
58
- $firstLetter = $user->getAttribute('name') ? $user->name[0] : 'A';
+ $firstLetter = $user->getAttribute('name') ? mb_substr($user->name, 0, 1, 'UTF-8') : 'A';
59
$placeholder = 'https://placehold.it/160x160/00a65a/ffffff/&text='.$firstLetter;
60
61
switch (config('backpack.base.avatar_type')) {
0 commit comments