ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How Do I Access Session Userdata?

December 03, 2011 5:25am

Subscribe [2]
  • #1 / Dec 03, 2011 5:25am

    @nnette

    109 posts

    I found my answer… Finally 😊


    I’m leaving this here just in case someone else needs the information.


    $this->EE->session->userdata(‘logged_in_member_id’)

    ____________

    $query = $this->EE->db->query("
    
    SELECT member_id 
    FROM exp_members  
    WHERE member_id = '".$this->session->userdata($logged_in_member_id)."' 
    
    ");

    I need to get a logged-in member’s information from a session.  What is wrong with my syntax above?


    ______

     

  • #2 / Dec 04, 2011 1:09pm

    Sean C. Smith

    3818 posts

    Hi @nnette,

    Glad you found the answer. Am going to close out this thread, but feel free to post again when you need more help.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases