Comment 'It may not be always...' to 'UNA 13 Profile Switcher - When Switching Profiles'
  • It may not be always preferable, in our setup usually we need to see/use the same page with different profiles

    • Hi all!

      It will require the PHP code to do it.

      • Please will you kindly let me know where to place the code?

        • Hello @InPage !

          It exists in the template/scripts/BxBaseServiceProfiles.php:

          'url_switch' => $sUrlProfileAction ? str_replace('{profile_id}', $aProfile['id'], $sUrlProfileAction) : BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher', array('switch_to_profile' => $aProfile['id'], 'redirect_back' => 1))

          So you need to change it in your child class BxTemplServiceProfiles.php like:

          'url_switch' => $sUrlProfileAction ? str_replace('{profile_id}', $aProfile['id'], $sUrlProfileAction) : BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher', array('switch_to_profile' => $aProfile['id'], 'redirect' => 'profile'))