Here's my situation. Users are searching for items. I have an Items
controller, and a Users controller.
When a user enters the Item they want, and their email on the /items/
index page, I first want to check if they are a user.
So what seemed logical to me was something like the following:
ItemsController extends AppController
{
function index()
{
if (!empty($this->data))
{
// See if the user email already exists in
the DB
if (!$user_id = $this->Item->User->is_user($this-
>data['User']['email']))
{
// then do this
}
// then process item search stuff
}
}
}
And of course, in the UsersController, I have an is_user() function
However, I get an error SQL syntax errors where the foreign controller
functions come up. I know the foreign functions work cause I tested
them standalone.
Is this not the correct way to have this type of functionality?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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