Guest User

Untitled

a guest
May 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. /* in my controller action -------------------- */
  2. // show/hide additional action buttons
  3. if ($this->Auth->user('id') != $id) {
  4. $this->set('allowactions', false);
  5. } else {
  6. $this->set('allowactions', true);
  7. }
  8.  
  9.  
  10.  
  11. /* in my view -------------------- */
  12. <? if ($allowactions){?>
  13.  
  14. …buttons/links here...
  15.  
  16. <? } ?>
Add Comment
Please, Sign In to add comment