From 6521045389c1fde0adf5399adc3f02e234906f13 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 8 Jan 2025 15:05:43 +0100 Subject: [PATCH] Link notifications for new users to the frontend user profile Typically, notifications are viewed in the frontend and the admin can also perform administrative actions from the frontend user profile. --- .../event/UserNeedActivationUserNotificationEvent.class.php | 4 ++-- .../UserRegistrationSuccessUserNotificationEvent.class.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserNeedActivationUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserNeedActivationUserNotificationEvent.class.php index fcd1423d94..3a19427e61 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserNeedActivationUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserNeedActivationUserNotificationEvent.class.php @@ -3,6 +3,7 @@ namespace wcf\system\user\notification\event; use wcf\data\user\UserProfile; +use wcf\page\UserPage; use wcf\system\request\LinkHandler; use wcf\system\user\notification\object\UserRegistrationUserNotificationObject; @@ -64,9 +65,8 @@ class UserNeedActivationUserNotificationEvent extends AbstractUserNotificationEv #[\Override] public function getLink(): string { - return LinkHandler::getInstance()->getLink('UserEdit', [ + return LinkHandler::getInstance()->getControllerLink(UserPage::class, [ 'object' => $this->getUserNotificationObject(), - 'isACP' => true, ]); } diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserRegistrationSuccessUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserRegistrationSuccessUserNotificationEvent.class.php index 588bcb0847..f102d32bf0 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserRegistrationSuccessUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserRegistrationSuccessUserNotificationEvent.class.php @@ -3,6 +3,7 @@ namespace wcf\system\user\notification\event; use wcf\data\user\UserProfile; +use wcf\page\UserPage; use wcf\system\request\LinkHandler; use wcf\system\user\notification\object\UserRegistrationUserNotificationObject; @@ -55,7 +56,7 @@ class UserRegistrationSuccessUserNotificationEvent extends AbstractUserNotificat 'application' => 'wcf', 'variables' => [ 'notification' => $this->notification, - 'username' => $this->getUserNotificationObject()->username, + 'username' => $this->getUserNotificationObject()->username, 'userNotificationObject' => $this->getUserNotificationObject(), ], ]; @@ -64,9 +65,8 @@ class UserRegistrationSuccessUserNotificationEvent extends AbstractUserNotificat #[\Override] public function getLink(): string { - return LinkHandler::getInstance()->getLink('UserEdit', [ + return LinkHandler::getInstance()->getControllerLink(UserPage::class, [ 'object' => $this->getUserNotificationObject(), - 'isACP' => true, ]); } -- 2.20.1