• Resolved Ben Palmer

    (@madebyreformat)


    Strange problem, some of the downloads keep redirecting the logged in users back to the register/login page even if they’re logged in. Only does it on some downloads and it’s not consistently the same download eg.

    Download #1, fine for user #1 and user #2
    Download #2, fine for user #1, user #2 is redirected
    Download #3, user #1 redirected, fine for user #2

    All users have the same permission level of subscriber and have tried deleting download and creating new one.

    Any ideas?

    https://www.ads-software.com/plugins/download-monitor/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ben Palmer

    (@madebyreformat)

    I used this code, found elsewhere on the forums

    function redirection() {
        $redirected_url = $_SERVER['HTTP_REFERER'];
        $download_url = $_SERVER['REQUEST_URI'];
        $download_redirect = urlencode("{$redirected_url}?redirect-to={$download_url}");
        return get_permalink(152); // redirect to custom register page
    
    }
    
    add_filter('dlm_access_denied_redirect','redirection');

    but it also seems to be a server issue. This works perfectly on my server and development server but for some reason, certain private files are being returned as access denied if this is in my functions.php

    Plugin Contributor Barry Kooij

    (@barrykooij)

    I’m sorry but what you’re looking for here is custom development and unfortunately I can’t help you with that. I suggest you ask your question somewhere created for these kind of questions like wordpress.stackexchange.com or consider hiring a developer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Logged in Users Being Redirected’ is closed to new replies.