Display user initials when tasks are in collapsed mode

This commit is contained in:
Frederic Guillot
2015-07-04 20:12:17 -04:00
parent 0a9ad08e9e
commit c231b65cfc
3 changed files with 40 additions and 0 deletions

View File

@@ -10,6 +10,24 @@ namespace Helper;
*/
class User extends \Core\Base
{
/**
* Get initials from a user
*
* @access public
* @param string $name
* @return string
*/
public function getInitials($name)
{
$initials = '';
foreach (explode(' ', $name) as $string) {
$initials .= mb_substr($string, 0, 1);
}
return mb_strtoupper($initials);
}
/**
* Get user id
*