Support » Fixing WordPress » $user_id in plugins

  • i’m trying to access the current user’s id in a plugin. the plugin is called here:

    add_action('admin_menu', 'add_guest_pages');

    i’ve tried get_currentuserinfo() but i get a “function undefined” error. i’m assuming tha’ts because pluggable.php hasn’t been called yet.. but i still need to get my user’s id..

    how can i get my user’s id from my plugin?

    help is much appreciated. thanks.

  • The topic ‘$user_id in plugins’ is closed to new replies.