Support » Developing with WordPress » How to get logged in user id in any sub domain,when I was login in network admin

  • Resolved Nimesh

    (@nimeshrathod1gmailcom)


    Hello All,
    I have multisite with latest wp version.

    I would like to get logged in user’s id, in any of my sub domain, when I was logged in network.

    I know many phase like :
    get_current_user_id();

    $current_user = wp_get_current_user();
    echo $current_user_id = $current_user->ID;

    but that all are get a zero/blank, when I was use in my sub domain.

    I am super admin with all access of admin/network

    • This topic was modified 1 year, 3 months ago by Nimesh.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get logged in user id in any sub domain,when I was login in network admin’ is closed to new replies.