diff options
Diffstat (limited to 'app/ServiceProvider/EventDispatcherProvider.php')
-rw-r--r-- | app/ServiceProvider/EventDispatcherProvider.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/ServiceProvider/EventDispatcherProvider.php b/app/ServiceProvider/EventDispatcherProvider.php index 880caa41..57543fe4 100644 --- a/app/ServiceProvider/EventDispatcherProvider.php +++ b/app/ServiceProvider/EventDispatcherProvider.php @@ -2,6 +2,7 @@ namespace Kanboard\ServiceProvider; +use Kanboard\Subscriber\LdapUserPhotoSubscriber; use Pimple\Container; use Pimple\ServiceProviderInterface; use Symfony\Component\EventDispatcher\EventDispatcher; @@ -14,6 +15,12 @@ use Kanboard\Subscriber\SubtaskTimeTrackingSubscriber; use Kanboard\Subscriber\TransitionSubscriber; use Kanboard\Subscriber\RecurringTaskSubscriber; +/** + * Class EventDispatcherProvider + * + * @package Kanboard\ServiceProvider + * @author Frederic Guillot + */ class EventDispatcherProvider implements ServiceProviderInterface { public function register(Container $container) @@ -28,6 +35,10 @@ class EventDispatcherProvider implements ServiceProviderInterface $container['dispatcher']->addSubscriber(new TransitionSubscriber($container)); $container['dispatcher']->addSubscriber(new RecurringTaskSubscriber($container)); + if (LDAP_AUTH && LDAP_USER_ATTRIBUTE_PHOTO !== '') { + $container['dispatcher']->addSubscriber(new LdapUserPhotoSubscriber($container)); + } + return $container; } } |