diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-30 21:01:41 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-30 21:01:41 -0400 |
commit | 679a22c718e8cb2d3ae6d981e1745bad948e1b92 (patch) | |
tree | e2b674aa555eae0941ff1b1a3db2a974c3f889d8 /app/Helper | |
parent | 02cf50de80a952a4a41e29b45947ac794a8d6bb9 (diff) |
Added some unit tests for avatar letter with UTF-8
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/UserHelper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Helper/UserHelper.php b/app/Helper/UserHelper.php index 5c466df3..ae3efe1d 100644 --- a/app/Helper/UserHelper.php +++ b/app/Helper/UserHelper.php @@ -36,10 +36,10 @@ class UserHelper extends Base $initials = ''; foreach (explode(' ', $name, 2) as $string) { - $initials .= mb_substr($string, 0, 1); + $initials .= mb_substr($string, 0, 1, 'UTF-8'); } - return mb_strtoupper($initials); + return mb_strtoupper($initials, 'UTF-8'); } /** @@ -174,7 +174,7 @@ class UserHelper extends Base if (isset($task['creator_id']) && $task['creator_id'] == $this->userSession->getId()) { return true; } - + if ($this->userSession->isAdmin() || $this->getProjectUserRole($task['project_id']) === Role::PROJECT_MANAGER) { return true; } |