Title: auth_redirect()
Last modified: August 19, 2016

---

# auth_redirect()

 *  794349
 * [17 years, 10 months ago](https://wordpress.org/support/topic/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)

 *  [rbredow](https://wordpress.org/support/users/rbredow/)
 * (@rbredow)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822159)
 * 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
 *  Thread Starter 794349
 * [17 years, 10 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822168)
 * Ok thanks, rbredow.
 *  [noko](https://wordpress.org/support/users/noko/)
 * (@noko)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822201)
 * +1 Thank you rbredow !!
    great help for me,
 * Bruno
 *  [hammertscrew](https://wordpress.org/support/users/hammertscrew/)
 * (@hammertscrew)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822263)
 * great!
    thanks a lot rbredow!
 *  [soydevon](https://wordpress.org/support/users/soydevon/)
 * (@soydevon)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822313)
 * +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.

## Tags

 * [auth_redirect](https://wordpress.org/support/topic-tag/auth_redirect/)

 * 5 replies
 * 5 participants
 * Last reply from: [soydevon](https://wordpress.org/support/users/soydevon/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/auth_redirect/#post-822313)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
