Timeline for Is it possible to have entries only visible to logged-in users?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2020 at 18:06 | comment | added | Sandwich |
{% if currentUser %} should definitely still work: docs.craftcms.com/v3/dev/global-variables.html#currentuser There's also the page-wide {% requireLogin %} tag, but that probably doesn't prevent the entry from showing up on listing pages.
|
|
Apr 13, 2020 at 17:42 | comment | added | Josh Coast | Something seems to have changed. None of these seem to work anymore in Craft CMS 3.3.16.3 {% if craft.session.isLoggedIn %} or {% if currentUser %} - Mr. Sadface. | |
Aug 23, 2015 at 7:10 | comment | added | megatrond |
{% requireLogin %} will redirect you to your loginPath if you are not logged in. More here
|
|
Aug 22, 2015 at 22:03 | comment | added | cmcjane | any difference between this and {% requireLogin %}? | |
Aug 10, 2015 at 17:56 | comment | added | Lindsey D |
You can also use {% if currentUser %} , which will return false if the user is not logged in.
|
|
Aug 10, 2015 at 17:36 | history | answered | megatrond | CC BY-SA 3.0 |