WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. dvelguru
    Member
    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
    Member
    Posted 3 years ago #

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

  3. Kitefr
    Member
    Posted 3 years ago #

    Hi,

    How did you resolved it ?!

  4. vladimir.bujak
    Member
    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