UNA 13 Profile Switcher - When Switching Profiles

When using the Profile Switcher is it possible for the "Switch" action to switch you to the profile and take you to the Profile page?

  • 618
  • More
Replies (4)
    • 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'))

            Login or Join to comment.