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.

Current_User brings mixed results

April 28, 2011 11:44pm

Subscribe [1]
  • #1 / Apr 28, 2011 11:44pm

    TheBronzePatriot

    25 posts

    This question may be related to a resolved thread.

    I am onto working on a client area for my site.  I have created a login page and simply just used the code from the user guide as my template.  I changed the return value to “clients/index”.  Where my issue lies is in the non-capability of listing all of the entries that a user is the author of after they log in.  I am using this code:

    {exp:channel:entries channel="clients" author_id="CURRENT_USER" dynamic="no" status="open"}
    {if no_results}There are no entries tied to this account{/if}
        {title}
    {/exp:channel:entries}

    I just want to test it out by listing just the titles before I get into custom fields and what not.  As far as users in the system, I have two dummy accounts and one entry that has a dummy account as the author and the other account doesn’t have any entries set as author.  What seems to be occurring is that I will login, under either account, and it will show the no_results line for both of them or if I remove the no_results tag it displays the lone entry on both accounts.  Making it appear then that the CURRENT_USER isn’t working correctly since only one account is the author of the lone entry and not both of them.

    I am using EE 2.1.3, Build 20110411.

  • #2 / Apr 29, 2011 1:40pm

    Sue Crocker

    26054 posts

    Closing this thread, since you posted the same thing in a different thread.

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

ExpressionEngine News!

#eecms, #events, #releases