We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Restrict Channel Entries to Author

How Do I?

vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

Is there some updated tutorial or guide on how to best achieve the restriction of channel entries to a specific author/member only?

I checked the documentation, and it seems I would first use the channel forms to create the form that can submit the entry to a channel.

If it helps, I do have the EE Harbor form modules which also seems to integrate with channels, but I was not able to find any documentation on how to do this per registered user/entry. It only has some references to member groups and displaying all entries from a specific channel, not by user.

Example:

Registered user “Joe” goes to a template page that contains a form. He saves some data which is an entry into a specific channel.

Registered user “Jane” goes to the same template page that contains the same form, but her submissions uses her ID on the entry. All entries on the channel are unique to avoid duplicates.

Joe then goes to a different template page, but can only see his created entries. Jane is also restricted to her entries only.

I would prefix some random ID on the entry title to make each one unique, but the key part here is to make sure one member cannot access the entry from another member.

If filtering the entries by author enough to achieve this?

       
Tom Jaeger's avatar
Tom Jaeger
492 posts
4 years ago
Tom Jaeger's avatar Tom Jaeger

For something along the lines of your example. I generally have used the author_id param on the channel entries tag. and set it to CURRENT_USER author_id="CURRENT_USER" That way Joe sees his entries (and no one elses) and Jane sees hers (and no one elses)

https://docs.expressionengine.com/latest/channels/entries.html#author_id

       
vw000's avatar
vw000
482 posts
4 years ago
vw000's avatar vw000

Thanks, yes, I figured that out after reading the docs.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.