WordPress.org

Support

Support » Installation » Where do we define If visitor is a user

Where do we define If visitor is a user

  • Greets:

    One of my clients have asked me to install JPCache on their WordPress 2.0.2 install and I am having a bit of an issue with it and am hoping for some assistance.

    We currently use JpCache on a number of PHPNuke installs over here without any issues. One of the features is the ability to turn it off for signed in users to the site by declairing that if the visitor is signed in, not to cache the pages. You can see this feature here.

    From a look see through the WordPress code, I don’t see where the flag within the cookie is set to announce where one is signed in or not. I’ve traced it back to the wp-include subdirectory but am not looking for the function call that determines it.

    Hopeing for some assistance.

    Thanks,
    -drmike

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mark (podz)

    @podz

    Support Maven

    I’m not sure what you mean by ‘not looking for the function call’ ?

    Would this somewhere not help?

    <?php
    global $user_login, $user_nickname ;
    get_currentuserinfo();
    if ($user_login){
    --your code--
    }
    else {
    --something else--
    }
    ?>

    or have I misunderstood?

    Sorry about that. How do we tell is the user is logged in? With PHPNuke, which is where we normally use JPCache, it’s with having $user defined.

    For example

    I gather WordPress is using $user_login as an on/ off to determine if a visitor is logged in or not?

    This is the recommended method for JPCache when it comes to PHPNuke as those posting will only be the ones logged in and those are the ones would would be wanting to see the site real time as they would be making changes and posting comments and whatnot.

    Thanks,
    -drmike

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where do we define If visitor is a user’ is closed to new replies.