Skip to content

Instantly share code, notes, and snippets.

@wms
Last active December 30, 2015 00:19
Show Gist options
  • Save wms/7749187 to your computer and use it in GitHub Desktop.
Save wms/7749187 to your computer and use it in GitHub Desktop.
public static function find($type, array $options = array())
{
// @todo: determine the Model to use instead of hard-coded 'User'
$options['conditions']['User.deleted'] = 0;
// @todo: add this condition for each 'With' relation instead of hard-coded 'Email'
$options['conditions']['Email.deleted'] = 0;
return parent::find($type, $options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment