Results 1 to 5 of 5

Thread: BE_USER_LOGGED_IN where can i get this true.

  1. #1

    Default BE_USER_LOGGED_IN where can i get this true.

    For example : code line from comments module, comment.php
    Code:
    // Get all published comments
    $objCommentsStmt = $this->Database->prepare("SELECT * FROM tl_comments WHERE source=? AND parent=?" . (!BE_USER_LOGGED_IN ? " AND published=1" : "") . " ORDER BY date" . (($objConfig->order == 'descending') ? " DESC" : ""));
    Here I am expecting, when I am logged in as a BE user (in my case as admin), I am able to see all the comments of an Article in FE (of course in same browser session) irrespective of published or not. Am I right?
    Since I am not seeing any comments unless I publish it, I assume I didn't understand the constant BE_USER_LOGGED_IN or doing something wrong. Any hinweis would be great.
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  2. #2
    User
    Join Date
    08-07-09.
    Location
    Kent, United Kingdom
    Posts
    92

    Default Re: BE_USER_LOGGED_IN where can i get this true.

    BE_USER_LOGGED_IN is to tell you if you have a backend user logged in, similarily FE_USER_LOGGED_IN will return if you have a frontend user logged in.
    It will not tell you which user is logged in.

  3. #3
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: BE_USER_LOGGED_IN where can i get this true.

    yes but you forget that comments also have MODERATION. You might have turned on moderation, then you have to approve the comment before its visible....

  4. #4
    User FloB's Avatar
    Join Date
    06-21-09.
    Posts
    157

    Default Re: BE_USER_LOGGED_IN where can i get this true.

    As far as I experienced, BE_USER_LOGGED_IN is 'true' in the frontend, only when you are previewing the site while showing disabled items.

  5. #5
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: BE_USER_LOGGED_IN where can i get this true.

    Yeah FloB is right. There is a drop-down menu in the preview mode that allows you to set this on/off. The new TL doesn't anymore show unpublished items by default... that was removed in favour of the new preview yellow bar...

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
  •