From: Marcel Werk Date: Wed, 8 Jan 2025 14:05:43 +0000 (+0100) Subject: Link notifications for new users to the frontend user profile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6521045389c1fde0adf5399adc3f02e234906f13;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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, ]); }