On Thu, Feb 17, 2011 at 7:52 AM, Christophe <c.vermey...@gmail.com> wrote:
> 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');?>

In addition to Stephen's advice, also note that your input names do
not match what you've told Auth to look for.

-- 
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

Reply via email to