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.

{member_id} - not truly global??

April 19, 2011 5:15pm

Subscribe [1]
  • #1 / Apr 19, 2011 5:15pm

    upshot

    85 posts

    Can someone explain why the following code is generating the following results?

    A - {member_id}
    {exp:channel:entries entry_id="49"}
    B - {member_id}
    {/exp:channel:entries}

    A - 26
    B - 1

    It looks like EE is treating {member_id} like {author_id} once it’s inside the Channel Entries tag.  How can we avoid this??  Is this a bug?  I thought {member_id} was a global variable.  Help is appreciated, we are on a very tight deadline.

    EDIT:

    NEVER MIND.  I found {logged_in_member_id}.

  • #2 / Apr 19, 2011 11:46pm

    Lisa Wess

    20502 posts

    Hey upshot -

    You got it, the channel entries tag does have a context. Glad you found the solution!

    For others, here is the user guide info on {logged_in_member_id}

    If anything else comes up, please don’t hesitate to start a new thread!

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

ExpressionEngine News!

#eecms, #events, #releases