diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-09 23:25:38 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-09 23:27:42 +0300 |
commit | 2ca03a6bc1b3ccf92347896bbe74f6bc47a1e6b2 (patch) | |
tree | 0dc0c5c15dbc83595b4a3e23bafa0401ee204ade /lib | |
parent | 305683caad95b182749b4fc924509d7b8135569d (diff) |
Drop legacy event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AppInfo/Application.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 7dc6a04..e2ab5fb 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -32,20 +32,17 @@ use OCA\Password_Policy\Listener\GenerateSecurePasswordEventListener; use OCA\Password_Policy\Listener\PasswordUpdatedEventListener; use OCA\Password_Policy\Listener\SuccesfullLoginListener; use OCA\Password_Policy\Listener\ValidatePasswordPolicyEventListener; -use OCA\Password_Policy\PasswordValidator; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\Authentication\Events\LoginFailedEvent; -use OCP\ILogger; use OCP\Security\Events\GenerateSecurePasswordEvent; use OCP\Security\Events\ValidatePasswordPolicyEvent; use OCP\User\Events\BeforePasswordUpdatedEvent; use OCP\User\Events\BeforeUserLoggedInEvent; use OCP\User\Events\PasswordUpdatedEvent; use OCP\User\Events\UserLoggedInEvent; -use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App implements IBootstrap { public function __construct() { @@ -65,21 +62,5 @@ class Application extends App implements IBootstrap { } public function boot(IBootContext $context): void { - $server = $context->getServerContainer(); - - // TODO: remove this legacy event listener once https://github.com/nextcloud/user_sql/pull/146 is in - $symfonyDispatcher = $server->getEventDispatcher(); - $symfonyDispatcher->addListener( - 'OCP\PasswordPolicy::validate', - function (GenericEvent $event) use ($server) { - /** @var ILogger $logger */ - $logger = $server->query(ILogger::class); - $logger->debug('OCP\PasswordPolicy::validate is deprecated. Listen to ' . ValidatePasswordPolicyEvent::class . ' instead'); - - /** @var PasswordValidator $validator */ - $validator = $server->query(PasswordValidator::class); - $validator->validate($event->getSubject()); - } - ); } } |