Try: <?php echo $this->Form->create('School', array('action' => 'login'));?>
Create -> School not school And you do not need the controller => 'school' K -----Original Message----- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of Christophe Sent: Thursday, February 17, 2011 9:22 AM To: CakePHP Subject: AuthComponent action manipulation. Hi there I'm working on an app where schools should able to login. I just read the cookbook and used the api to understand the component but i'm missing a link I believe. My controller 'school_controller' has an action 'login'. And I've set the userModel and fields. $this->Auth->userModel = 'School'; $this->Auth->fields = array( 'username' => 'email1', 'password' => 'schoolcode' ); My form looks like this: <?php echo $this->Form->create('school', array('controller'=>'school','action' => 'login'));?> <h2>School inlog</h2> <?php echo $form->input('email'); echo $form->input('pass'); ?> <?php echo $form->end('Submit');?> But when I look at my SC I see Cake created a form with an action action="/code/index.php/school/schools/login" The problem is that "schools" doesnt exists and I have no clue why Cake adds it. Is there someone that can explain this or give a refference to an article about this? Thanks Christophe -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php