WordPress.org

Ready to get started?Download WordPress

Forums

auth_redirect() (6 posts)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    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'.

  2. rbredow
    Member
    Posted 5 years ago #

    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

  3. Anonymous
    Unregistered
    Posted 5 years ago #

    Ok thanks, rbredow.

  4. noko
    Member
    Posted 5 years ago #

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

    Bruno

  5. hammertscrew
    Member
    Posted 5 years ago #

    great!
    thanks a lot rbredow!

  6. soydevon
    Member
    Posted 5 years ago #

    +3 thank you rbredow!

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

Topic Closed

This topic has been closed to new replies.

About this Topic