Support » Plugins and Hacks » auth_redirect()

  • I used auth_redirect() in a plugin I developed as something to do and for personal use last summer. And I’ve just now upgraded my public wordpress from version 2.3.x(2?) (just before the new admin theme came out) to the current version. I hadn’t upgraded before because I didn’t care for the new admin theme, and I was being lazy and not getting the admin theme customized to go with me blog them (I customized the admin theme even before the new theme). Well I just took the time to finally do that and the ‘plugin’ I developed uses auth_redirect() and it’s not working. Did something change somewhere in my update gap? What it’s doing is it redirects to the login page fine, but after you login it comes back to the login page instead of going to my plugin’s page. Even though I’m now logged in. I can tell I’m logged in because it shows the ‘Site Admin’ and the ‘logout’ link in the sidebar in stead of the ‘register’/’login’ link. It even directs you to the login page if I try and navigate to my plugin’s page.

    Side question: How do I change my WordPress forum password from what it set it to at registration time? I click the ‘view my profile’ link and I get a ‘user not found page’.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I just noticed the same thing with my plugin. I changed my code to this to ensure that it only redirects if the user is not logged in:

    <?php if (!is_user_logged_in()) { auth_redirect(); } ?>

    It seems that this might be a bug introduced in the auth_redirect() code in 2.6

    Ok thanks, rbredow.

    +1 Thank you rbredow !!
    great help for me,


    thanks a lot rbredow!



    +3 thank you rbredow!

    I want this fixed, it’s been 6 months already.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘auth_redirect()’ is closed to new replies.