Comment to 'Redirect to 'Profile' page after log in/sign in '
  • LeonidS thanks a lot for your help. I tried your code but it sounds that there is a problem with permalink() and unpermalink() functions on UNA.
    The generated code gets a random wrong value of the id=
    for example I was logged in with a profile id=2, after logging out and login again I was directed to profile id=5
    I tried to use getLoggedId() instead of bx_get_logged_profile_id() but both generate wrong value for the id variable.

    • Sorry, but it needs to track what's wrong, both functions should return the correct current profile id.

      • Sorry, but it needs to track what's wrong, both functions should return the correct current profile id.

        both functions getLoggedId() and bx_get_logged_profile_id() work fine in other areas of the code. it sounds that the problem is with the permalink /unpermalink functions. Have you been able to reproduce this error?
        - where do you want me to track this? the error and access log files have nothing. 

        • Then try this variant:

          header('Location: ' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=view-persons-profile', array('id' => bx_get_logged_profile_id())));