| | <?php |
| |
|
| | namespace Kanboard\User\Avatar; |
| |
|
| | use Kanboard\Core\Base; |
| | use Kanboard\Core\User\Avatar\AvatarProviderInterface; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | class AvatarFileProvider extends Base implements AvatarProviderInterface |
| | { |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function render(array $user, $size) |
| | { |
| | $url = $this->helper->url->href('AvatarFileController', 'image', array('user_id' => $user['id'], 'hash' => md5($user['avatar_path'].$size), 'size' => $size)); |
| | $title = $this->helper->text->e($user['name'] ?: $user['username']); |
| | return '<img src="' . $url . '" alt="' . $title . '" title="' . $title . '">'; |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function isActive(array $user) |
| | { |
| | return !empty($user['avatar_path']); |
| | } |
| | } |
| |
|