summaryrefslogtreecommitdiffstats
path: root/lib/AppInfo/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AppInfo/Application.php')
-rw-r--r--lib/AppInfo/Application.php23
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 764212df..024fca58 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -32,18 +32,17 @@ declare(strict_types=1);
namespace OCA\Social\AppInfo;
use OCA\Social\Dashboard\SocialWidget;
-use OCA\Social\Listeners\DeprecatedListener;
use OCA\Social\Listeners\ProfileSectionListener;
+use OCA\Social\Listeners\UserAccountListener;
use OCA\Social\Notification\Notifier;
use OCA\Social\Search\UnifiedSearchProvider;
use OCA\Social\WellKnown\WebfingerHandler;
+use OCP\Accounts\UserUpdatedEvent;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
-use OCP\IUser;
use OCP\Profile\BeforeTemplateRenderedEvent;
-use Symfony\Component\EventDispatcher\GenericEvent;
require_once __DIR__ . '/../../vendor/autoload.php';
@@ -66,26 +65,14 @@ class Application extends App implements IBootstrap {
$context->registerSearchProvider(UnifiedSearchProvider::class);
$context->registerWellKnownHandler(WebfingerHandler::class);
$context->registerEventListener(BeforeTemplateRenderedEvent::class, ProfileSectionListener::class);
- $context->registerDashboardWidget(SocialWidget::class);
+ $context->registerEventListener(UserUpdatedEvent::class, UserAccountListener::class);
- $this->registerDeprecatedListener();
+ $context->registerDashboardWidget(SocialWidget::class);
}
public function boot(IBootContext $context): void {
$manager = $context->getServerContainer()
- ->getNotificationManager();
+ ->getNotificationManager();
$manager->registerNotifierService(Notifier::class);
}
-
-
- public function registerDeprecatedListener(): void {
- $dispatcher = \OC::$server->getEventDispatcher();
- $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) {
- /** @var IUser $user */
- $user = $event->getSubject();
- /** @var DeprecatedListener $deprecatedListener */
- $deprecatedListener = \OC::$server->get(DeprecatedListener::class);
- $deprecatedListener->userAccountUpdated($user);
- });
- }
}