Check that the logged in user matches the owner of the post.
if ($post['Comment']['user_id'] == $this->Auth->user('id')) {
$this->Comment->delete();
}
On Oct 8, 2:33 pm, Simon <[email protected]> wrote:
> is there any way for the users delete their own comment's not the
> others how can i do that ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---