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 in reverse_related_entries behaves like author id

June 17, 2009 8:22pm

Subscribe [2]
  • #1 / Jun 17, 2009 8:22pm

    mogya

    11 posts

    In my understanding,
    {author_id} is the Member ID for the user who write the weblog entry
    And {member_id} is the Member ID for the currently logged-in user.
    they’re completely different parameter, aren’t they?

    However, in reverse_related_entries tag, it seems member_id behaves like author id.

    {exp:weblog:entries weblog="hogehoge" limit="1" disable="categories|category_fields|trackbacks"}
    {reverse_related_entries}
    <li>{entry_id}:{author_id}:{member_id}</li>
    {/reverse_related_entries }
    {/exp:weblog:entries weblog="magic_product" limit="1" }

    I got like this:
    21507💯1
    21508💯1
    21509:6:6

    Why the member_id is changed???
    Any way to get the currently logged-in user in reverse_related_entries?

    I’m using EE1.6.7 now.

  • #2 / Jun 17, 2009 8:25pm

    Greg Aker

    6022 posts

    hum.  Off the top of my head, you could use the $SESS class to grab it.  Or have you tried:

    author_id="CURRENT_USER"

    -greg


    ETA:  There is also {logged_in_member_id} that you can try.

  • #3 / Jun 17, 2009 8:31pm

    mogya

    11 posts

    I’ve tried But it still shows same result..
    I’m afraid author_id doesn’t work in reverse_related_entries.

    > As Relationships are cached in order to reduce the load on ExpressionEngine, these are the only parameters available at this time.
    http://expressionengine.com/docs/modules/weblog/reverse_related_entries.html

  • #4 / Jun 17, 2009 8:33pm

    mogya

    11 posts

    O,o. I got working with {logged_in_member_id}.

    Thank you Greg. But why {member_id} doesn’t work? bug?

  • #5 / Jun 18, 2009 2:50am

    John Henry Donovan

    12339 posts

    mogya,

    Glad you got it working. Checking with dev team as to why your first method did not work. Can I just confirm with you that your closing weblog entries tag does not look like this

    {/exp:weblog:entries weblog="magic_product" limit="1" }
  • #6 / Jun 18, 2009 3:03am

    mogya

    11 posts

    John,

    >Can I just confirm with you that your closing weblog entries tag does not look like this

    Yes. That’s my simple mistake. Sorry.

    Even using this,

    {exp:weblog:entries weblog="hogehoge" limit="1" disable="categories|category_fields|trackbacks"}
    {reverse_related_entries}
    <li>{entry_id}:{author_id}:{member_id}</li>
    {/reverse_related_entries}
    {/exp:weblog:entries}

    Still I can’t get corret member_id.

  • #7 / Jun 18, 2009 3:07am

    John Henry Donovan

    12339 posts

    mogya,

    that’s fine. I just wanted to confirm it. I will report back with what I find out for you.

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

ExpressionEngine News!

#eecms, #events, #releases