- Previous thread: cake_livesearch.zip copy?
- Next thread: SMTP - Not working
- Threads sorted by date: cakephp 200906
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---
$result = ClassRegistry::init('Restriction')->find('all', array('conditions'
=>array('Restriction.badword' =>$wordtotest)));
HTH,
Paul
-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] 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 cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---
Related Threads
- OptionParser: options and args passed to PyQT app - python
- [users] F3 (Autotext) blocks the program - openoffice
- Strange Core Dump Error Message on a FreeBSD6.3 System - freebsd
- Procedure vs method - ruby
- KDE4 general q.... - freebsd
- Nautilus troubles writing to CD - fedora
- One instance listen on 127.0.0.1 and on single external ip - tomcat
- Fsck | repair and/or check? - freebsd
- [wwwdocs, committed] Update link to 4.4.0 status report - gcc
- [dev] Need Help, Problem on building with MinGW. - openoffice
- Re: [PHP] Mailing lists - php