Monday, January 23, 2012

Re: Protecting access to field, does exist?

Limit what you fetch in the first place using the containable behaviour which you can set to fetch the models and/or fields:

contain => array(
  'Friends' // all fields from related friends results
)

contain => array(
  'Friends.email' // will only fetch Friends.id and Friends.email fields
)

HTH, Paul.

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: