Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* in my controller action -------------------- */
- // show/hide additional action buttons
- if ($this->Auth->user('id') != $id) {
- $this->set('allowactions', false);
- } else {
- $this->set('allowactions', true);
- }
- /* in my view -------------------- */
- <? if ($allowactions){?>
- …buttons/links here...
- <? } ?>
Add Comment
Please, Sign In to add comment