basically you'd want to set $this->data['Model']['user_id'] =
$this->Session->user_id (I forget correct Session syntax at the moment,
but you ge tthe idea) - do this before your
$this->Model->save($this->data) statement in your controller's "add" or
"edit" methods

in your "Edit" method do pretty much what you were saying - before you
load the Model's data into your edit form, when you're querying the
Model to populate, add something like '`Model`.`user_id` =
"{$session_user_id}"' to your find() statement

take a look at rdBloggery -> http://rd11.com/rdOS/ -> it uses a simple
but handy authentication / permissions schema (rdAuth) and answers a
lot of questions like yours


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to