WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
is_user_logged_in returns false (12 posts)

  1. leggo-my-eggo
    Member
    Posted 1 year ago #

    When visiting my site at the domain-mapped URL, is_user_logged_in returns false, even though I'm logged in as the network admin.

    If I change the domain mapping primary domain back to the default, the function returns true.

    Is this a bug in the Domain Mapping plugin?

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. John Turner
    Member
    Posted 1 year ago #

    Following

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    The security features in every browser prevent servers from accessing information that the browser has from another domain. You have to log into the mapped domain for is_user_logged_in() to return true.

  4. John Turner
    Member
    Posted 1 year ago #

    Hi Ron,

    Thanks for the reply, this is good to know!

  5. leggo-my-eggo
    Member
    Posted 1 year ago #

    Ah, thank you, Ron. So, does this mean that if I have my front-end mapped to a custom domain, while my back-end is at the default subdomain, that I'm out of luck? Because I can't figure out how to log into the mapped domain when the login page is directed at the default subdomain. Am I missing something obvious?

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Try turning on the remote login setting.

  7. leggo-my-eggo
    Member
    Posted 1 year ago #

    Remote login is enabled. The first four domain options are checked, the last one unchecked.

  8. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    Have you tested to see whether the remote login is working?

  9. leggo-my-eggo
    Member
    Posted 1 year ago #

    Yes, it works fine. So, if I go to http://customdomainname.com/wp-admin, I will be redirected to the login screen for http://subdomain.maindomain.com.

    Is that what you mean?

  10. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    After that redirect & you log in are you logged in to both the subdomain and the mapped domain?

    You can go to a single post and look at the comment form to see if you are logged in.

  11. leggo-my-eggo
    Member
    Posted 1 year ago #

    Ron, hm. I guess not, although I DO see the "Edit This" link.

  12. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 1 year ago #

    You wouldn't see the edit this link unless you were logged in. If is_user_logged_in is returning false in that scenario then you have something interfering with it.

    If it was domain mapping you wouldn't see the edit this link.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic