When a user accesses the "Invitations" page (user/uid/invitations) the warning message that links to this same page appears.
This is redundant and could be eliminated.
- Invite a user.
- Log in with this user, click on the link of the warning message to go to the invitations page.
- See the warning message on top.
The notifyAboutPendingInvitations should check wether the $event equals the url::fromRoute and, if so, avoid outputting the message.
/**
* Notify user about Pending invitations.
*
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The GetResponseEvent to process.
*/
public function notifyAboutPendingInvitations(RequestEvent $event) {
if ($this->groupInvitationLoader->loadByUser()) {
$replace = ['@url' => Url::fromRoute('view.my_invitations.page_1', ['user' => $this->currentUser->id()])->toString()];
$message = $this->t('You have pending group invitations. <a href="@url">Visit your profile</a> to see them.', $replace);
$this->messenger->addMessage($message, 'warning', FALSE);
}
}
TODO
TODO
None
None
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.