best place for validation of data is in models, but it's flexible
enough ;)

look for $validation member in Model class, and also beforeValidation
callback

On 20 juin, 09:35, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Ok one more question.. If i have multiple controllers that i want all
> to use some validation method, where would be the best place to put
> the validation method?
>
> On Jun 17, 5:28 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > I would keep the functionality in separate controllers, not bloat your
> > Users one just because you want to access the User model.  To ensure
> > that users cannot view/edit someone elses data you just need to
> > incorporate this into whatever ACL you use.  For our application I
> > have a function in app_model called isUserOwned( $user_id, $row_id ),
> > which just does a lookup to see if the requested row is owned by the
> > passed user id.  This can easily be included in all my controller
> > actions before allowing the request to proceed.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to