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.

Author_id="CURRENT_USER" is not displaying the logged in member's results

September 13, 2010 3:33pm

Subscribe [2]
  • #1 / Sep 13, 2010 3:33pm

    Jon Horton

    38 posts

    This question may be related to a resolved thread.


    Hello,

    I’m having a similar issue to the post above.  I’ve tried everything listed, but to no avail.

    What I’m trying to do is use the author_id parameter to allow a user to view entries that they have authored.  What I’m noticing is that if I view the page immediately after the user #1 logs is, I can view only that member’s entries.  However, If user #2 logs in and submits an entry, it seems that user #2’s member_id is cached.

    When the user #1 tries to view the page containing a list of their entries, they see the entries of user #2.  I’m not using template caching on any of these pages, so I’m unsure why this is happening.

    Here is my code:

    {if logged_in}
        {if segment_3 == ''}
            {exp:weblog:entries weblog="{my-weblog}" author_id="CURRENT_USER" status="not closed|Incomplete" dynamic="off" show_future_entries="yes"}
            Display content here
            {/exp:weblog:entries}
        {/if}
    {/if}

    I should also note that when I hard-code the member_id it works as it should.

    Any ideas? I’ve tried all I know.

    Thanks,
    Jon

  • #2 / Sep 13, 2010 3:42pm

    Jon Horton

    38 posts

    Also forgot to mention that I can use

    {exp:weblog:entries weblog="{my-weblog}" status="not closed|Incomplete" }
                    {if author_id == logged_in_member_id }
                     -- Content Here --
                    {/if}
                {exp:weblog:entries}

    It seems though, that achieving this by using the author_id parameter would use less queries.

  • #3 / Sep 13, 2010 4:06pm

    Ingmar

    29245 posts

    What version and build of EE are you using? Any extensions? Also, are you using any caching at all?

  • #4 / Sep 13, 2010 5:18pm

    Jon Horton

    38 posts

    EE 1.6.9, Not using any caching that I’m aware of.

    Enabled Extensions:
    Entry Added Notificatiton
    jQuery for CP
    SAEF Redirect
    Structure
    Fieldframe
    Custom System Messages
    Logout Redirect
    Entry Update Notification
    Textile Editor Helper
    LG Member Form Customiser
    LG Tiny MCE
    Redeemer

  • #5 / Sep 14, 2010 3:49pm

    Ingmar

    29245 posts

    Can you try to disable your extensions globally? Then use as simple a template as possible and build up from there.

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

ExpressionEngine News!

#eecms, #events, #releases