Keyword

Restrict items in category view (category_item.php) to only show items belonging to the logged in user

  • natecovington
  • natecovington's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 9 months ago #91405 by natecovington
Hi,I am building a client portal using K2, and I need to modify the category_item.php to ONLY show the item if the user is logged in and the item belongs to them (created_by).I've done something similar on the K2 item.php template, but I am at a loss for how to make this work.  Here is what I'm trying to do:modify category_item.php<?php if($this->user->AUTHOR): ?>(if the item belongs to this user - I am not sure what the PHP should be, here)Then -> Show the item so that they can "read more" and get the full item.It is important that user A cannot see user B's items!  Thanks in advance.-Nate[edit]Solved my own problem.  See attached TXT file for my code[/edit]
Attachments:

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum