Results 1 to 2 of 2

Thread: Displaying records for logged in member

  1. #1
    New user
    Join Date
    02-12-10.
    Posts
    7

    Default Displaying records for logged in member

    Hi All

    I think I am being a bit dim!

    I have the Catalog listing module on a page and I am trying to limit its results automatically by matching only the records of the person/member logged in to the front end.

    I have my users added into the taxonomy system in their own section called 'users'. The only entry in the taxonomy system matches the members username exactly. (I was trying to pull them directly from the members table but something was going very wrong!)

    I have put
    Code:
    Cat_name="{{user::username}}"
    in the condition box. 'Cat_name' is the field in the catalog which matches the username in the taxonomy system.

    When loading the page with the listing module (logged in as the front end user) the listing module returns no results.

    If i take the speech marks out I get the following error message.
    Code:
    Fatal error: Uncaught exception Exception with message Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (SELECT id,pid,sorting,tstamp,Cat_name,cat_title,cat_deadline,cat_progress, (SELECT name FROM tl_catalog_types WHERE tl_catalog_types.id=cat_TaskManager.pid) AS catalog_name, (SELECT jumpTo FROM tl_catalog_types WHERE tl_catalog_types.id=cat_TaskManager.pid) AS parentJumpTo FROM cat_TaskManager WHERE pid='3' AND Cat_name=) thrown in /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/libraries/Database.php on line 642
    #0 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/libraries/Database.php(589): Database_Statement->query()
    #1 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/catalog/ModuleCatalogList.php(212): Database_Statement->execute(Array)
    #2 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/Module.php(129): ModuleCatalogList->compile()
    #3 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/catalog/ModuleCatalog.php(130): Module->generate()
    #4 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/catalog/ModuleCatalogList.php(76): ModuleCatalog->generate()
    #5 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/ContentModule.php(72): ModuleCatalogList->generate()
    #6 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/libraries/Controller.php(415): ContentModule->generate()
    #7 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/ModuleArticle.php(173): Controller->getContentElement('321')
    #8 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/Module.php(129): ModuleArticle->compile()
    #9 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/ModuleArticle.php(71): Module->generate()
    #10 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/libraries/Controller.php(348): ModuleArticle->generate(false)
    #11 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/libraries/Controller.php(221): Controller->getArticle('140', false, false, 'main')
    #12 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/system/modules/frontend/PageRegular.php(71): Controller->getFrontendModule('0', 'main')
    #13 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/index.php(198): PageRegular->generate(Object(DB_Mysql_Result))
    #14 /home/fhlinux193/m/morvargh-sailing.co.uk/user/htdocs/index.php(329): Index->run()
    #15 {main}
    Can anyone help me? To be honest I have very little PHP knowledge other than butchering a few templates to move stuff around so am a bit lost. I have installed Catalog as described in the manual etc.

    I'd really appreciate any help anyone could give me.

    Thank you all

    Matt

  2. #2
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default Re: Displaying records for logged in member

    or try in template put fields (or any other data) for only logged members into this code:
    Code:
    <?php if (FE_USER_LOGGED_IN): ?>
    For members eye only
    <?php endif; ?>
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •