Title: Delay before user object defined
Last modified: August 22, 2019

---

# Delay before user object defined

 *  [allisonmaccormick](https://wordpress.org/support/users/allisonmaccormickgmailcom/)
 * (@allisonmaccormickgmailcom)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/delay-before-user-object-defined/)
 * Hi
    I recently moved my site to a subdomain and am referencing it from another
   website. I have a link from the main website to the login form on the subdomain.
   Upon logging in, the user is taken to the WordPress toolbar screen so I know 
   the login was successful. I have a page of custom code (that has worked for 2
   years) and when I go to it, the user object is not defined — the function ‘is_user_logged_in()’
   returns false. If I wait 45 seconds (and do nothing else) and refresh the page,
   the user is logged in.
 * Interestingly if I go straight to the subdomain and login there is no lag before
   the ‘is_user_logged_in()’ function returns true.
 * Any ideas how I can speed up the 45 seconds? Or what might be causing the delay?
   
   Thank you!!

Viewing 1 replies (of 1 total)

 *  [mcmwebsol](https://wordpress.org/support/users/mcmwebsol/)
 * (@mcmwebsol)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/delay-before-user-object-defined/#post-11862292)
 * Is there any caching on your website?
    Perhaps your hosting company has added
   it at the server-level or in a mu-plugin.

Viewing 1 replies (of 1 total)

The topic ‘Delay before user object defined’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [mcmwebsol](https://wordpress.org/support/users/mcmwebsol/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/delay-before-user-object-defined/#post-11862292)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
