Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin Help – Getting User ID

  • @regina13

    Member

    Hey. I’m pretty new to this Plugin thing. Please forgive my newb-ishness.

    So I’m trying to write a function that involves taking the current user’s id and searches a table for information. So far I’ve been able to access a table in a database with a static number, but I can’t retrieve the current user’s id as a variable to pass into the query. I also wrote the query myself, and I was wondering if there are bb functions I can use instead.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @ashfame

    Participant

    In your function declare $bb_current_user as global and print_r it to see what all you can have :)

    function blah() {
    global $bb_current_user;
    print_r( $bb_current_user );
    }

    @ashfame

    Participant

    In your function declare $bb_current_user as global and print_r it to see what all you can have :)

    function blah() {
    global $bb_current_user;
    print_r( $bb_current_user );
    }

    @regina13

    Member

    Thank you! =)

    @regina13

    Member

    Thank you! =)

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar