Ready to get started?Download WordPress


[resolved] Using current_user(obj) externally in 3.1 (4 posts)

  1. dvelguru
    Posted 3 years ago #

    This used to work in previous versions:
    include_once '../../../wp-config.php';
    include_once '../../../wp-load.php';
    include_once '../../../wp-includes/wp-db.php';
    include_once 'functions.php';

    return $current_user->ID;

    But now, it's returning 0.

    I have an upload.php file that one of my jquery upload scripts is using, and I'd like to use $wpdb, and $current_user objects, but it's not working.

    Any ideas?

  2. dvelguru
    Posted 3 years ago #

    I've even switched the order of the includes around, to no success.

  3. Kitefr
    Posted 3 years ago #


    How did you resolved it ?!

  4. vladimir.bujak
    Posted 3 years ago #

    Hi Guys!
    Does anyone knows how to solve this issue?
    it used to work for me before and after upgrading WP it is not.

Topic Closed

This topic has been closed to new replies.

About this Topic