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.
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.
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....
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.
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...