$result = ClassRegistry::init('Restriction')->find('all', array('conditions'
=>array('Restriction.badword' =>$wordtotest)));HTH, Paul -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Sent: Tuesday, 30 June 2009 4:41 p.m. To: CakePHP Subject: find with unrelated model I am trying to create a validation function where I check the User.slug field against a tables of banned words So if a user tries to use a slug "profile" it will come back invalid I have Restrictions table with all banned words which is not related to any model on the site. How do I do a query from the users model to check restrictions table? Tried App::Import('Model', 'Restriction'); method but all i get is error -> Trying to get property of non-object __________ Information from ESET NOD32 Antivirus, version of virus signature database 4198 (20090629) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4198 (20090629) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
