Skip to content

Commit

Permalink
Link notifications for new users to the frontend user profile
Browse files Browse the repository at this point in the history
Typically, notifications are viewed in the frontend and the admin can also perform administrative actions from the frontend user profile.
  • Loading branch information
BurntimeX committed Jan 8, 2025
1 parent f52822f commit 6521045
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -64,9 +65,8 @@ public function getEmailMessage($notificationType = 'instant')
#[\Override]
public function getLink(): string
{
return LinkHandler::getInstance()->getLink('UserEdit', [
return LinkHandler::getInstance()->getControllerLink(UserPage::class, [
'object' => $this->getUserNotificationObject(),
'isACP' => true,
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -55,7 +56,7 @@ public function getEmailMessage($notificationType = 'instant')
'application' => 'wcf',
'variables' => [
'notification' => $this->notification,
'username' => $this->getUserNotificationObject()->username,
'username' => $this->getUserNotificationObject()->username,
'userNotificationObject' => $this->getUserNotificationObject(),
],
];
Expand All @@ -64,9 +65,8 @@ public function getEmailMessage($notificationType = 'instant')
#[\Override]
public function getLink(): string
{
return LinkHandler::getInstance()->getLink('UserEdit', [
return LinkHandler::getInstance()->getControllerLink(UserPage::class, [
'object' => $this->getUserNotificationObject(),
'isACP' => true,
]);
}

Expand Down

0 comments on commit 6521045

Please sign in to comment.