I was following the blog tutorial that showed how to protect posts,
but in my app, any user can edit any other user...
So I wanted to protect the edit and delete functions of my
UsersController.
This is what I'm trying right now :
public function isLoggedUser() {
if ($user['User']['id'] == $this->Session->read('Auth.User.id'))
{
return true;
}
}
this should check if the logged user id stored in session is the same
as the user that will be edited or deleted...
But I'm stuck here... I don't know how to implement this properly. Any
help ?
Thanks a lot.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php