On Wed, Dec 8, 2010 at 3:37 PM, WhyNotSmile <[email protected]> wrote:
> I'm setting up a site in Cake 1.3, and I'm using the Authentication
> component.  I've created registration and login pages - the
> registration is working fine, but the login is giving me the standard
> error 'No username and password found with that combination'.
>
> On the registration page, I enter my username and password, and those
> go into the database fine - the password is hashed as it should be.
>
> The login form is basically:
>
> echo $form->create('User', array('id'=>'reg_form',
> 'action'=>'login'));
> echo 'Email address:' . $form->input('username', array('label' =>
> false, 'maxlength' => '35')) . '<br/>';
> echo 'Password:' . $form->input('password', array('label' => false,
> 'maxlength' => '35')) . '<br/>';
> echo '<input type="submit" class="form_submit" value="Log In"/>';
>
>
> and in the controller I just have:
>
> function login() {
>  $this->set('title_for_layout', 'Please sign in');
> }
>
>
>
> I have the debug level set to 2, but I'm not getting any errors.  I
> added a debug($data) in beforeFilter, and it shows the username and
> password, both unencrypted.
>
> Has anyone come across this, or can you suggest what I could do to
> narrow it down a bit?

Did you include parent::beforeFilter(); in your beforeFilter()?

Come to that, did you set up Auth in AppController::beforeFilter()?

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

Reply via email to