From b6cf429735470a74b4a3830a1d260d2bdddeebf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 7 Jun 2021 10:24:53 +0200 Subject: [PATCH] Revert "Add PoC event listeners for authentication events" This was a PoC commit. It is reverted so that it remains in the commit history. This reverts commit 5c8dc3b07bc3ad128975f7378744be58037b42ef. --- com.woltlab.wcf/eventListener.xml | 12 ------- ...oggedInEmailNotificationListener.class.php | 31 ------------------- ...cceededEmailNotificationListener.class.php | 31 ------------------- 3 files changed, 74 deletions(-) delete mode 100644 wcfsetup/install/files/lib/system/event/listener/UserLoggedInEmailNotificationListener.class.php delete mode 100644 wcfsetup/install/files/lib/system/event/listener/UserMultifactorSucceededEmailNotificationListener.class.php diff --git a/com.woltlab.wcf/eventListener.xml b/com.woltlab.wcf/eventListener.xml index a3fddcea1a..e7beec0941 100644 --- a/com.woltlab.wcf/eventListener.xml +++ b/com.woltlab.wcf/eventListener.xml @@ -39,17 +39,5 @@ wcf\system\event\listener\UserLinkHtmlInputNodeProcessorListener all - - wcf\system\user\authentication\UserLoggedIn - :default - wcf\system\event\listener\UserLoggedInEmailNotificationListener - all - - - wcf\system\user\authentication\UserMultifactorSucceeded - :default - wcf\system\event\listener\UserMultifactorSucceededEmailNotificationListener - all - diff --git a/wcfsetup/install/files/lib/system/event/listener/UserLoggedInEmailNotificationListener.class.php b/wcfsetup/install/files/lib/system/event/listener/UserLoggedInEmailNotificationListener.class.php deleted file mode 100644 index 7d8ce0668d..0000000000 --- a/wcfsetup/install/files/lib/system/event/listener/UserLoggedInEmailNotificationListener.class.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @package WoltLabSuite\Core\System\Event\Listener - */ -final class UserLoggedInEmailNotificationListener implements IParameterizedEventListener -{ - /** - * @inheritDoc - * @param UserLoggedIn $eventObj - */ - public function execute($eventObj, $className, $eventName, array &$parameters) - { - $email = new SimpleEmail(); - $email->setRecipient($eventObj->getUser()); - $email->setSubject("You logged in"); - $email->setMessage("You logged in"); - $email->setHtmlMessage("You logged in"); - $email->send(); - } -} diff --git a/wcfsetup/install/files/lib/system/event/listener/UserMultifactorSucceededEmailNotificationListener.class.php b/wcfsetup/install/files/lib/system/event/listener/UserMultifactorSucceededEmailNotificationListener.class.php deleted file mode 100644 index 17cac351ef..0000000000 --- a/wcfsetup/install/files/lib/system/event/listener/UserMultifactorSucceededEmailNotificationListener.class.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @package WoltLabSuite\Core\System\Event\Listener - */ -final class UserMultifactorSucceededEmailNotificationListener implements IParameterizedEventListener -{ - /** - * @inheritDoc - * @param UserMultifactorSucceeded $eventObj - */ - public function execute($eventObj, $className, $eventName, array &$parameters) - { - $email = new SimpleEmail(); - $email->setRecipient($eventObj->getUser()); - $email->setSubject("You performed MFA with {$eventObj->getSetup()->getObjectType()->objectType}"); - $email->setMessage("You performed MFA with {$eventObj->getSetup()->getObjectType()->objectType}"); - $email->setHtmlMessage("You performed MFA with {$eventObj->getSetup()->getObjectType()->objectType}"); - $email->send(); - } -} -- 2.20.1