• The following Code has been working fine for over 3 years. Last week, i set up a new Server with The same OS and the same Webserver (Windows Server 2012R2 + IIS 8) and now it Returns NULL…. I have no Idea what could be different between these two Servers…. Maybe any configuration on my Webserver in relation to the Sessions?!

    I hope someone could help me…

    I use following Code:

    require_once(‘../wp-load.php’);
    get_currentuserinfo();
    global $current_user;
    $user_id = $current_user->ID;
    echo $user_id;

    I know taht i use the Right directory to load my wp-load File.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘get_current_user_id() returns 0 on extra php site’ is closed to new replies.