|
|
|
|
@ -115,6 +115,7 @@ class Application extends App implements IBootstrap {
|
|
|
|
|
// the instance is specific to a lazy bound Access instance, thus cannot be shared.
|
|
|
|
|
false
|
|
|
|
|
);
|
|
|
|
|
$context->registerEventListener(PostLoginEvent::class, FirstLoginListener::class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function boot(IBootContext $context): void {
|
|
|
|
|
@ -144,7 +145,6 @@ class Application extends App implements IBootstrap {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$context->injectFn(Closure::fromCallable([$this, 'registerBackendDependents']));
|
|
|
|
|
$context->injectFn(Closure::fromCallable([$this, 'registerFirstLoginListener']));
|
|
|
|
|
|
|
|
|
|
\OCP\Util::connectHook(
|
|
|
|
|
'\OCA\Files_Sharing\API\Server2Server',
|
|
|
|
|
@ -152,9 +152,15 @@ class Application extends App implements IBootstrap {
|
|
|
|
|
'\OCA\User_LDAP\Helper',
|
|
|
|
|
'loginName2UserName'
|
|
|
|
|
);
|
|
|
|
|
\OCP\Util::connectHook(
|
|
|
|
|
'\OC\User',
|
|
|
|
|
'assignedUserId',
|
|
|
|
|
FirstLoginListener::class,
|
|
|
|
|
'onAssignedId'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher) {
|
|
|
|
|
private function registerBackendDependents(IAppContainer $appContainer, IEventDispatcher $dispatcher): void {
|
|
|
|
|
$dispatcher->addListener(
|
|
|
|
|
'OCA\\Files_External::loadAdditionalBackends',
|
|
|
|
|
function () use ($appContainer) {
|
|
|
|
|
@ -165,14 +171,4 @@ class Application extends App implements IBootstrap {
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function registerFirstLoginListener(IEventDispatcher $dispatcher) {
|
|
|
|
|
$dispatcher->addServiceListener(PostLoginEvent::class, FirstLoginListener::class);
|
|
|
|
|
\OCP\Util::connectHook(
|
|
|
|
|
'\OC\User',
|
|
|
|
|
'assignedUserId',
|
|
|
|
|
FirstLoginListener::class,
|
|
|
|
|
'onAssignedId'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|