@peterhashair opened this Issue on March 3rd 2022 Contributor

Expected Behavior

When I am doing add user to invite user request. I found.
After you click to add a new user from the Quick Links section, it appends showadduser=1 to the URL permanent, which causes you to land on the add new user page when you click the user menu item.

Current Behavior

https://user-images.githubusercontent.com/3783072/156672944-5b27cc49-6eb3-41db-8604-c17fca7b0553.mp4

atomo.mp4

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@sgiehl commented on March 4th 2022 Member

I guess this is more global problems. Any query parameters that are appended on a page might be passed through everywhere. Same can be seen with &update=1 when updating something.

@tsteur commented on March 7th 2022 Member

@peterhashair that be a simple fix if I see this right like

diff --git a/plugins/UsersManager/Menu.php b/plugins/UsersManager/Menu.php
index 9cb3f9372c..0c7a16bdca 100644
--- a/plugins/UsersManager/Menu.php
+++ b/plugins/UsersManager/Menu.php
@@ -16,7 +16,7 @@ class Menu extends \Piwik\Plugin\Menu
     public function configureAdminMenu(MenuAdmin $menu)
     {
         if (Piwik::isUserHasSomeAdminAccess() && UsersManager::isUsersAdminEnabled()) {
-            $menu->addSystemItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 15);
+            $menu->addSystemItem('UsersManager_MenuUsers', $this->urlForAction('index', ['showadduser'=>false]), $order = 15);
         }

         if (Piwik::hasUserSuperUserAccess() && API::getInstance()->getSitesAccessFromUser('anonymous')) {
Powered by GitHub Issue Mirror